Настройка входа с использованием учетной записи Azure Active Directory с использованием настраиваемых политик в Azure Active Directory B2C Не работает - PullRequest
0 голосов
/ 20 ноября 2018

Я создал пользовательскую политику в своем клиенте B2C и хочу, чтобы она подключалась к организации AD.

Я выполнил все шаги по ссылке ниже.https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-setup-aad-custom

Но я вижу эту ошибку https://jwt.ms/#error=server_error&error_description=AADB2C90037%3a+An+error+occurred+while+processing+the+request.+Please+contact+administrator+of+the+site+you+are+trying+to+access.%0d%0aCorrelation+ID%3a+c18d72fe-4ebd-4dcf-8b65-d5779a491d18%0d%0aTimestamp%3a+2018-11-20+15%3a22%3a21Z%0d%0a

Я перепробовал все, что мог.Но это не решает.В чем проблема.Чего мне не хватает.

<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>
...