小编bas*_*lio的帖子

AADSTS700016:在目录“some_another_id”中找不到标识符为“some_id”的应用程序

这是一个错误 img

我需要一个带有自定义策略的联合身份验证(当用户通过身份验证时,我需要他在 b2c 用户中显示为联合身份,而不是其他人或其他我可以用单个租户实现的东西),我以前在 azure 中将默认策略设置为 OpenId提供者,但没有找到如何在自定义策略中使用 OpenId 进行 FEDERATION 身份验证,所以我使用 SAML 和我所拥有的以下内容进行了验证。

我试过单租户,这不是我需要的。问题也不在于签名密钥,因为我已经遇到了这个问题并解决了这个问题。我创建了自签名证书,先将其上传到 AAD 应用程序,然后再上传到 b2c 策略密钥。我认为验证联邦的应用程序不是问题,因为我使用默认策略。

    <TechnicalProfile Id="Office-SAML2">
      <DisplayName>Microsoft Office 365</DisplayName>
      <Description>Login with your ADFS account</Description>
      <Protocol Name="SAML2"/>
      <Metadata>
        <Item Key="WantsSignedRequests">false</Item>
        <Item Key="PartnerEntity">https://login.microsoftonline.com/<b2c tenant id>/federationmetadata/2007-06/federationmetadata.xml</Item>
        <Item Key="XmlSignatureAlgorithm">Sha256</Item>
      </Metadata>
      <CryptographicKeys>
        <Key Id="SamlAssertionSigning" StorageReferenceId="B2C_1A_SamlCert"/>
        <Key Id="SamlMessageSigning" StorageReferenceId="B2C_1A_SamlCert"/>
      </CryptographicKeys>
      <OutputClaims>
        <OutputClaim ClaimTypeReferenceId="issuerUserId" PartnerClaimType="userPrincipalName" />
        <OutputClaim ClaimTypeReferenceId="givenName" PartnerClaimType="given_name"/>
        <OutputClaim ClaimTypeReferenceId="surname" PartnerClaimType="family_name"/>
        <OutputClaim ClaimTypeReferenceId="email" PartnerClaimType="email"/>
        <OutputClaim ClaimTypeReferenceId="displayName" PartnerClaimType="name"/>
        <OutputClaim ClaimTypeReferenceId="identityProvider" DefaultValue="https://sts.windows.net/<b2c tenant id>/" AlwaysUseDefaultValue="true" />
        <OutputClaim ClaimTypeReferenceId="authenticationSource" DefaultValue="socialIdpAuthentication" AlwaysUseDefaultValue="true" />
      </OutputClaims>
      <OutputClaimsTransformations>
        <OutputClaimsTransformation ReferenceId="CreateRandomUPNUserName"/> …
Run Code Online (Sandbox Code Playgroud)

adfs saml saml-2.0 azure-active-directory azure-ad-b2c

13
推荐指数
2
解决办法
4万
查看次数