将用户从本地 SQL 服务器迁移到 Azure Active Directory B2C 时如何保持登录名相同

How to keep login name same when migrating users from local SQL Server to Azure Active Directory B2C

我正在将本地用户从 SQL 数据库迁移到 Azure AD B2C。 Azure AD 默认使用用户主体名称 (UPN) 进行登录。我已经阅读了以下文档,但无法理解如何配置 Azure AD 以使用我现有的用户名作为备用登录名。我还需要在首次登录时为每个用户更新密码。这是一个 Web 应用程序,我想通过将应用程序用户重定向到自定义的 Microsoft 登录页面,将用户身份验证转移到 Azure AD B2C。

https://docs.microsoft.com/en-us/azure/active-directory-b2c/user-migration

https://github.com/azure-ad-b2c/user-migration

非常感谢

创建用户时,见此sample

您将用户的用户名放在 issuerAssignedId 值中。

  "identities": [
    {
      "signInType": "emailAddress",
      "issuer": "b2cprod.onmicrosoft.com",
      "issuerAssignedId": "jsmith@yahoo.com"
    }

在原始属性级别上,这称为 signInNames.[signInType]。您会在自定义策略中看到它被称为 signInNames.X