azure-ad-b2c - AAD-FindLocalAccountWithSocialEmail 产生 No suitable claims providers were found

标签 azure-ad-b2c azure-ad-b2c-custom-policy

我正在尝试将社交提供商登录名自动链接到现有的本地帐户。 我正在使用 auto-linking sample ,但是这样做已经将示例 Facebook ClaimsProviders/etc 替换为用于 Google 的示例。使用我的 B2C_1A_ACCOUNTLINK_SUSI 版本,我可以成功创建并登录本地帐户。我还可以使用 Google 成功添加用户(如果我事先删除了用户 - 没有链接)。所以,我知道这两者都是单独起作用的。

但是,当我创建本地帐户并尝试使用 Google 作为 idp 登录并链接该帐户时,我收到一条错误消息,指出找不到合适的声明提供者。

有没有人用 Google 尝试过这个自动链接示例,并看到我可能需要对输入/输出声明或其他进行任何调整?在几个周末的时间里,我做了几个,试图让它发挥作用。 AppInsights 显示它发生在 AAD-FindLocalAccountWithSocialEmail (AzureActiveDirectoryProvider) 中,异常是:找不到合适的声明提供者。

任何建议表示赞赏。如果这有助于诊断,我可以发布我的 Google ClaimsProvider block 。

最佳答案

可能是因为未使用颁发者集合启用 IdP。

在您所有的 Google IdP 技术资料中,请确保:

  <OutputClaim ClaimTypeReferenceId="identityProvider" DefaultValue="google.com" AlwaysUseDefaultValue="true" />

Google-OAUTH-Link 技术配置文件中,确保具有以下内容:

<Metadata>
  <Item Key="ClaimTypeOnWhichToEnable">currentIssuers</Item>
  <Item Key="ClaimValueOnWhichToEnable">google.com</Item>
</Metadata> 
<!--snip-->
<OutputClaimsTransformations>
  <OutputClaimsTransformation ReferenceId="CreateUserIdentityToLink" />
  <OutputClaimsTransformation ReferenceId="AppendUserIdentityToLink" />
</OutputClaimsTransformations>
<EnabledForUserJourneys>OnItemExistenceInStringCollectionClaim</EnabledForUserJourneys>

HandleLinkLocalToSocial 子旅程中,确保在链接步骤中添加 Google IdP:

        <OrchestrationStep Order="1" Type="CombinedSignInAndSignUp" ContentDefinitionReferenceId="api.idpselections">
<!--snip preconditions-->
          <ClaimsProviderSelections DisplayOption="ShowSingleProvider">
            <ClaimsProviderSelection TargetClaimsExchangeId="LinkGoogleExchange1"/>
          </ClaimsProviderSelections>
        </OrchestrationStep>

        <OrchestrationStep Order="2" Type="ClaimsExchange">
<!--snip preconditions-->
          <ClaimsExchanges>
            <ClaimsExchange Id="LinkGoogleExchange1" TechnicalProfileReferenceId="Google-OAUTH-Link"/>
          </ClaimsExchanges>
        </OrchestrationStep>

        <OrchestrationStep Order="3" Type="CombinedSignInAndSignUp" ContentDefinitionReferenceId="api.signuporsignin">
<!--snip preconditions-->
          <ClaimsProviderSelections DisplayOption="ShowSingleProvider">
            <ClaimsProviderSelection TargetClaimsExchangeId="LinkGoogleExchange2"/>
        </OrchestrationStep>

        <OrchestrationStep Order="4" Type="ClaimsExchange">
<!--snip preconditions-->
          <ClaimsExchanges>
            <ClaimsExchange Id="LinkGoogleExchange2" TechnicalProfileReferenceId="Google-OAUTH-Link"/>
          </ClaimsExchanges>
        </OrchestrationStep>  

关于azure-ad-b2c - AAD-FindLocalAccountWithSocialEmail 产生 No suitable claims providers were found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70756739/

相关文章:

javascript - CSS 或 JavaScript 如何对 Azure B2C 电子邮件验证过程的不同步骤使用react?

azure-ad-b2c - 身份体验框架 : Is there any reference documentation?

azure - 无法将查询参数传递给 azure-ad-b2c 自定义策略并存储值

azure - 将隐私政策添加到 azure b2c 应用程序上的自定义 ui

azure - 如何使用自定义策略为 Multi-Tenancy Azure Active Directory 设置直接登录

Azure B2C session 导致意外流量

azure-ad-b2c - Azure AD B2C 为自定义策略自定义加载屏幕

azure - 当我尝试上传 ProfileMFAPhoneNumber 的 B2C 自定义策略时,出现验证错误

azure - Microsoft Graph API 中的一个或多个属性包含无效值

azure - 身份验证成功后无法在 Azure B2C 中获取用户名