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

Azure AD B2C - How to create a consumer user programatically?

我应该在 Azure B2C 上调用哪个 API 来创建 CONSUMER 用户?显然 this one 正在消失...

使用这个Microsoft Graph 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"
  }
}

这是正确的示例和文档。

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

https://docs.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

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