【发布时间】:2021-05-07 10:35:50
【问题描述】:
我必须使用 Seamless migration 将用户从 Azure Active Directory B2C 租户(旧租户)迁移到另一个(新租户)
在 oldtenant 中,我有一些“用户”(@oldtenant.onmicrosoft.com)和一些“Azure AD B2C 用户”(@otherdomain.com)。
我必须检索用户访问令牌以检查用户的凭据以在新租户中创建用户。 我使用here 提供的源代码创建了一个使用用户凭据检索用户令牌的 API。 我还在旧租户中创建了一个应用注册,以允许 API 访问用户的信息。
当我尝试为@oldtenant.onmicrosoft.com 检索用户令牌时,它可以工作,但是当我尝试为用户@otherdomain.com 检索令牌时,我收到以下错误:
error_description: "AADSTS50034: The user account {EmailHidden} does not exist in the oldtenant.onmicrosoft.com directory. To sign into this application, the account must be added to the directory.Trace ID: 74d2a027-7011-4ee5-b62e-d022dd861d06.Correlation ID: 07427a5b-494a-44e7-947d-40eb5a4aee66.Timestamp: 2021-05-07 10:22:58Z"
它应该可以工作,但是我使用了文档提供的代码。我不明白为什么它不起作用。
【问题讨论】:
标签: azure-active-directory azure-ad-b2c azure-ad-b2c-custom-policy