2017-11-02 7 views
0

Azure AD B2C에서 Signup/Signin 프로세스 중에 호출되는 RESTful 서비스를 개발 중입니다. 내 서비스가 상태를 기록하고 데이터가 성공적으로 도착했으며 출력 소유권 주장 (customerId)이 생성됩니다.사용자 지정 정책 RESTful-Api UserJourney 오류

는하지만 다음과 같은 오류 메시지가 나타납니다, 사용자가 생성되지 않습니다

AADB2C90161 자체 주장 보내기 응답은 이유 (내부 서버 오류)로 실패했습니다. https://github.com/Azure-Samples/active-directory-b2c-custom-policy-starterpack/tree/master/scenarios/aadb2c-ief-rest-api-netfw/

습니까 사람의 경험과 유사한 문제를 내 경우에는 문제가 될 수 있는지 힌트를 가지고 :이 예를 향해 자신을 지향 한

7eac5fd2-cd85-4535-b166-4cc8f0264d07
상관 관계 ID? TrustFrameworkExtension에서

:이 경우

<ClaimsProvider> 
    <DisplayName>KTM REST APIs</DisplayName> 
    <TechnicalProfiles> 
    <TechnicalProfile Id="REST-API-SignUp"> 
     <DisplayName>Generate and return customerID claim</DisplayName> 
     <Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.RestfulProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" /> 
     <Metadata> 
     <Item Key="ServiceUrl">https://<my.service.com>/api/Identity/Signup</Item> 
     <Item Key="AuthenticationType">None</Item> 
     <Item Key="SendClaimsIn">Body</Item> 
     </Metadata> 

     <InputClaims>   
     <InputClaim ClaimTypeReferenceId="email" PartnerClaimType="Email" /> 
     <InputClaim ClaimTypeReferenceId="givenName" PartnerClaimType="FirstName" /> 
     <InputClaim ClaimTypeReferenceId="surname" PartnerClaimType="LastName" /> 
     <InputClaim ClaimTypeReferenceId="testClaim" PartnerClaimType="ObjectId" />   
     </InputClaims> 
     <OutputClaims> 
     <OutputClaim ClaimTypeReferenceId="customerId" PartnerClaimType="CustomerId" /> 
     </OutputClaims> 
     <UseTechnicalProfileForSessionManagement ReferenceId="SM-Noop" /> 
    </TechnicalProfile> 

    <TechnicalProfile Id="LocalAccountSignUpWithLogonEmail"> 
     <OutputClaims> 
     <OutputClaim ClaimTypeReferenceId="customerId" PartnerClaimType="CustomerId" /> 
     </OutputClaims> 
     <ValidationTechnicalProfiles> 
     <ValidationTechnicalProfile ReferenceId="REST-API-SignUp" /> 
     </ValidationTechnicalProfiles> 
    </TechnicalProfile> 
    </TechnicalProfiles> 
</ClaimsProvider> 
+0

지속적인 소유권 주장을 추가 했습니까? – Ramakrishna

+2

[App 통찰력을 통해 로깅을 구성합니까] (https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-troubleshoot-custom)? – spottedmahn

답변

0

, 런타임 오류가 있습니다. 클레임 유형 "customerId"는 정책의 문자열로 정의되어 있지만 wire (partnerClaimType이 "CustomerId"인 경우)와 같은 값은 숫자이므로 시스템에서 매핑 할 수 없습니다. 이 메시지가 개선 될 수 있지만,

{ 
    "name": "John", 
    "age": 24 
} 

:이 라인을 참조하십시오 :

<OutputClaim ClaimTypeReferenceId="customerId" PartnerClaimType="CustomerId" /> 

이것은 나머지 API는 다수 대 문자열을 반환하는 방법이다 (숫자에서 따옴표의 부재에주의) you should configure your policy to collect logs using Application Insights. 이렇게하면 유사한 런타임 문제를 더 쉽게 디버깅 할 수 있습니다.