Azure B2C 什么是 serviceProviderMetadata?

标签 azure saml azure-ad-b2c

我设置了 Azure B2C 作为 SAML token 颁发者,ADFS 作为 SAML IdP。

每次我尝试登录时,都会从 B2C 收到以下错误(它不会进一步转到 ADFS):

致命异常

该值不能为空或空格。参数名称:serviceProviderMetadata

这在 B2C 中意味着什么? 我的 Azure B2C SAML 颁发者配置中是否缺少某些内容? 这是我的登录政策

<RelyingParty>
<DefaultUserJourney ReferenceId="SignUpOrSignInFmdClient" />
<UserJourneyBehaviors>
  <SingleSignOn Scope="Application" />
    <SessionExpiryType>Absolute</SessionExpiryType>
  <SessionExpiryInSeconds>900</SessionExpiryInSeconds>      
</UserJourneyBehaviors>
<TechnicalProfile Id="PolicyProfile">
  <DisplayName>PolicyProfile</DisplayName>
  <Protocol Name="SAML2" />

  <Metadata>
    <Item Key="KeyEncryptionMethod">Rsa15</Item>
    <Item Key="DataEncryptionMethod">Aes256</Item>
    <Item Key="XmlSignatureAlgorithm">Sha256</Item>
  </Metadata>

  <OutputClaims>
    <OutputClaim ClaimTypeReferenceId="socialIdpUserId" />
    <OutputClaim ClaimTypeReferenceId="IdpUserGroups" />
    <OutputClaim ClaimTypeReferenceId="IdpUserName"/>        
    <OutputClaim ClaimTypeReferenceId="identityProvider" />
    <OutputClaim ClaimTypeReferenceId="userPrincipalName" PartnerClaimType="userPrincipalName" />
    <OutputClaim ClaimTypeReferenceId="objectId"/>
  </OutputClaims>

  <SubjectNamingInfo ClaimType="userPrincipalName" Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" ExcludeAsClaim="false"/>
</TechnicalProfile>

最佳答案

这是根据每个服务的需要获取和加载的 SAML 数据,然后在可配置的持续时间内缓存在全局缓存中。您需要为元数据 URL 添加一个值,以便它不会返回 null。

示例:

<Item Key="PartnerEntity">https://adfs.example.com/FederationMetadata/2007-06/FederationMetadata.xml&lt;/Item>

您还需要将 PartnerEntity 设置为 True,以允许您自己指定联合元数据 XML 文件的链接。

关于Azure B2C 什么是 serviceProviderMetadata?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52488066/

相关文章:

authentication - Saml2AuthenticationModule 类去了哪里?

azure - 将角色添加到 AppRegistration 并将用户分配给角色

asp.net - 限制 Azure 中的 Web 服务调用

Azure 容器注册表保留策略

deployment - Windows Azure 临时区域和生产区域之间有什么区别?

javascript - 用于 React 的 Azure AD B2C 库

azure - 访问 token 不起作用 Azure AD 自定义策略

Azure 应用服务指标 - 如何解释与请求相关的总和与计数?

ruby-on-rails - 设计 + OmniAuth Saml:ActionController::InvalidAuthenticityToken

从 DER ASN.1 到 XMLDSIG P1363 的 PHP DSA 签名转换