Azure AD B2C - 如何以编程方式创建使用者用户?



我应该在Azure B2C上调用哪个API来创建消费者用户?显然这个要消失了...

这是正确的示例和文档。

https://learn.microsoft.com/en-us/azure/active-directory-b2c/manage-user-accounts-graph-api

https://learn.microsoft.com/en-us/graph/api/user-post-users?view=graph-rest-1.0&tabs=http#example-2-create-a-user-with-social-and-local-account-identities

不要使用 forceChangePassword=true,除非使用用户流 V1(已弃用(。必须始终将密码过期策略设置为从不。

使用此Microsoft图形 API。

下面是一个示例请求

POST https://graph.microsoft.com/v1.0/users
Content-type: application/json
{
"accountEnabled": true,
"displayName": "displayName-value",
"mailNickname": "mailNickname-value",
"userPrincipalName": "upn-value@tenant-value.onmicrosoft.com",
"passwordProfile" : {
"forceChangePasswordNextSignIn": true,
"password": "password-value"
}
}

最新更新