azure - 使用 Azure Active Directory B2C 中的自定义策略使用 Azure Active Directory 帐户设置登录不起作用
问题描述
我在我的 B2C 租户中创建了一个自定义策略,我希望它连接到组织 AD。
我已按照以下链接中的所有步骤进行操作。 https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-setup-aad-custom
我已经尽我所能。但这并没有解决。什么问题。我错过了什么。
<TechnicalProfile Id="CloudProfile">
<DisplayName>xxxEmployee</DisplayName>
<Description>Login with your xxx account</Description>
<Protocol Name="OpenIdConnect"/>
<OutputTokenFormat>JWT</OutputTokenFormat>
<Metadata>
<Item Key="METADATA">https://login.windows.net/{tennat}/.well-known/openid-configuration</Item>
<Item Key="ProviderName">https://sts.windows.net/00000-0000-0000-0000/</Item>
<Item Key="client_id">000-0000-0000-0000</Item>
<Item Key="IdTokenAudience">000-000-0000-0000</Item>
<Item Key="UsePolicyInRedirectUri">false</Item>
<Item Key="response_types">code</Item>
<Item Key="scope">openid</Item>
<Item Key="response_mode">form_post</Item>
<Item Key="HttpBinding">POST</Item>
</Metadata>
<CryptographicKeys>
<Key Id="client_secret" StorageReferenceId="B2C_1A_key"/>
</CryptographicKeys>
<OutputClaims>
<OutputClaim ClaimTypeReferenceId="socialIdpUserId" PartnerClaimType="oid"/>
<OutputClaim ClaimTypeReferenceId="tenantId" PartnerClaimType="tid"/>
<OutputClaim ClaimTypeReferenceId="givenName" PartnerClaimType="given_name" />
<OutputClaim ClaimTypeReferenceId="surName" PartnerClaimType="family_name" />
<OutputClaim ClaimTypeReferenceId="displayName" PartnerClaimType="name" />
<OutputClaim ClaimTypeReferenceId="authenticationSource" DefaultValue="socialIdpAuthentication" AlwaysUseDefaultValue="true" />
<OutputClaim ClaimTypeReferenceId="identityProvider" DefaultValue="AzureADContoso" AlwaysUseDefaultValue="true" />
</OutputClaims>
<!-- <OutputClaimsTransformations> -->
<!-- <OutputClaimsTransformation ReferenceId="CreateRandomUPNUserName"/> -->
<!-- <OutputClaimsTransformation ReferenceId="CreateUserPrincipalName"/> -->
<!-- <OutputClaimsTransformation ReferenceId="CreateAlternativeSecurityId"/> -->
<!-- <OutputClaimsTransformation ReferenceId="CreateSubjectClaimFromAlternativeSecurityId"/> -->
<!-- </OutputClaimsTransformations> -->
<UseTechnicalProfileForSessionManagement ReferenceId="SM-Noop"/>
</TechnicalProfile>
用户旅程
<UserJourney Id="SignUpOrSignInCOmpany">
<OrchestrationSteps>
<OrchestrationStep Order="1" Type="CombinedSignInAndSignUp" ContentDefinitionReferenceId="api.signuporsignin">
<ClaimsProviderSelections>
<ClaimsProviderSelection ValidationClaimsExchangeId="LocalAccountSigninEmailExchange" />
<ClaimsProviderSelection TargetClaimsExchangeId="CloudExchange" />
</ClaimsProviderSelections>
<ClaimsExchanges>
<ClaimsExchange Id="LocalAccountSigninEmailExchange" TechnicalProfileReferenceId="SelfAsserted-LocalAccountSignin-Email" />
</ClaimsExchanges>
</OrchestrationStep>
<OrchestrationStep Order="2" Type="ClaimsExchange">
<Preconditions>
<Precondition Type="ClaimsExist" ExecuteActionsIf="true">
<Value>objectId</Value>
<Action>SkipThisOrchestrationStep</Action>
</Precondition>
</Preconditions>
<ClaimsExchanges>
<ClaimsExchange Id="SignUpWithLogonEmailExchange" TechnicalProfileReferenceId="LocalAccountSignUpWithLogonEmail" />
<ClaimsExchange Id="CloudExchange" TechnicalProfileReferenceId="CloudProfile" />
</ClaimsExchanges>
</OrchestrationStep>
<!-- This step reads any user attributes that we may not have received when in the token. -->
<OrchestrationStep Order="3" Type="ClaimsExchange">
<ClaimsExchanges>
<ClaimsExchange Id="AADUserReadWithObjectId" TechnicalProfileReferenceId="AAD-UserReadUsingObjectId" />
</ClaimsExchanges>
</OrchestrationStep>
<OrchestrationStep Order="4" Type="SendClaims" CpimIssuerTechnicalProfileReferenceId="JwtIssuer" />
</OrchestrationSteps>
<ClientDefinition ReferenceId="DefaultWeb" />
</UserJourney>
解决方案
推荐阅读
- list - 努力在 Haskell 中提取列表的一部分
- ms-access - Sharepoint 服务器和 Access 之间的连接
- vue.js - VUE 如何点击图片并重定向到页面?
- ignite - StopNodeOrHaltFailureHandler 配置
- .net - 在 .Net MVC 中使用 Paypal API 发送和接收资金
- c# - 如果节点不为空,如何防止拖放[C#]
- google-bigquery - 返回完整地址坐标的 BigQuery SQL Geo 函数
- r - 使用 Nbclust() 计算最佳簇数
- gradle - Kotlin MPP - 在 IntelliJ 上使用 Gradle 构建问题
- javascript - 如何从 PHP 代码编写 java script 脚本