2017-10-27 12 views
6

푸른 색 인증에 이상한 문제가 있습니다. 그것은 하나의 시나리오 (adal을 사용하여 각진 응용 프로그램으로 로그인)에서 작동하지만 다른 응용 프로그램에서는로드되지 않습니다 (asp.net 웹 API를로드하고 swiger UI 인증 메커니즘을 통해 로그인). 나는에 게시물을 좁혀 : 오히려 unhelpfully 반환Azure 광고 B2C oauth/OpenIdConnect 문제

https://login.microsoftonline.com/te/{tenantid}/oauth2/authresp 

엔드 포인트 :

302 

<html> 
<head> 
    <title>Object moved</title></head> 
    <body> 
    <h2>Object moved to <a href="http://localhost:49919/swagger/ui/oauth2redirect-html#error=server_error&amp;error_description=AADB2C%3a+An+exception+has+occured.%0d%0aCorrelation+ID%3a+1816d2f8-aa74-4433-a7c0-d9c8fabebdb0%0d%0aTimestamp%3a+2017-10-27+13%3a46%3a08Z%0d%0a&amp;state={ommitted}">here</a>.</h2> 
</body> 
</html> 

은 기본적으로 나에게 예외를 말하는가 발생했습니다.

error_description = AADB2C 예외가 발생했습니다.

CorrelationID를 = 1816d2f8-aa74-4433-a7c0-d9c8fabebdb0

타임 스탬프 = 2017년 10월 27일 13시 46분 8초

각도 응용 프로그램은, 정확히 같은 포스트 않습니다하지만 그러나 링크를 반환 토큰 ID :

302 

<html> 
    <head> 
    <title>Object moved</title> 
    </head> 
    <body> 
    <h2>Object moved to <a href="http://localhost:4200/#state={state - 
    ommitted}&amp;id_token={id token - omitted}">here</a>. 
    </h2> 
    </body> 
</html> 

게시물의 차이점을 볼 수 없습니다. 이 하나가 작동하지 않습니다

POST https://login.microsoftonline.com/te/{tenant - omitted}/oauth2/authresp HTTP/1.1 
Host: login.microsoftonline.com 
Connection: keep-alive 
Content-Length: 1595 
Cache-Control: max-age=0 
Origin: https://login.microsoftonline.com 
Upgrade-Insecure-Requests: 1 
Content-Type: application/x-www-form-urlencoded 
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36 
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 
DNT: 1 
Referer: https://login.microsoftonline.com/{tenant - omitted}/oauth2/authorize?client_id={clientid - omitted}&redirect_uri=https:%2f%2flogin.microsoftonline.com%2fte%2f{tenant - omitted}%2foauth2%2fauthresp&response_type=id_token&response_mode=form_post&nonce={nonce}&state=StateProperties 
Accept-Encoding: gzip, deflate, br 
Accept-Language: en-GB,en;q=0.9,de-CH;q=0.8,de;q=0.7,fr-CH;q=0.6,fr;q=0.5,it-CH;q=0.4,it;q=0.3 
Cookie: {cookie - omitted}=; x-ms-gateway-slice=005; stsservicecookie=cpim_te 

id_token={omitted} 

(웹 API 프로젝트에 대한 자신감의 UI에서 시작)하지만이 게시물을 수행합니다 게시물로

POST https://login.microsoftonline.com/te/{tenant - omitted}/oauth2/authresp HTTP/1.1 
Host: login.microsoftonline.com 
Connection: keep-alive 
Content-Length: 1590 
Cache-Control: max-age=0 
Origin: https://login.microsoftonline.com 
Upgrade-Insecure-Requests: 1 
Content-Type: application/x-www-form-urlencoded 
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36 
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 
DNT: 1 
Referer: https://login.microsoftonline.com/{tenant - omitted}/oauth2/authorize?client_id={clientid - omitted}&redirect_uri=https:%2f%2flogin.microsoftonline.com%2fte%2f{tenant - omitted}%2foauth2%2fauthresp&response_type=id_token&response_mode=form_post&nonce={nonce}&state=StateProperties 
Accept-Encoding: gzip, deflate, br 
Accept-Language: en-GB,en;q=0.9,de-CH;q=0.8,de;q=0.7,fr-CH;q=0.6,fr;q=0.5,it-CH;q=0.4,it;q=0.3 
Cookie: {cookie - omitted}; x-ms-gateway-slice=003; stsservicecookie=cpim_te 

id_token={omitted} 

는 문제가 하나 쿠키 어딘가에 누워 있어야 거의 동일하다 또는 ID 토큰 (보안상의 이유로 제공 할 수는 없습니다). 두 요청의 ID 토큰을 모두 http://www.jwt.io에 붙여 넣으면 두 가지 모두에 올바른 주장이있는 것과 동일한 정보를 얻을 수 있습니다. 그래서 나는 조금 붙어 있었고 하늘색 팀의 누군가가 들어와 도움을 줄 것을 기대 했습니까? 당신이 /v2.0/ B2C 엔드 포인트를 호출하지 않는 것처럼 요청 샘플에서 리퍼러를 바탕으로

많은 감사

+0

두 경우 모두 공유 할 수있는 페이지 또는 요청 URL이 있습니까? 그렇지 않은 경우 피들러 요청에서 요청 URL을 가져올 수 있으며 localhost를 타겟팅하고 있어도 두 경우 모두 제공 할 수 있습니까? –

+0

예 위드 러의 전체 요청을 제공 할 수 있지만 민감한 정보가 포함되어 있으므로 여기에 게시 할 수 없습니다. – Magrangs

+0

@OmerIqbal LinkedIn에 귀하를 추가했습니다. 귀하가이 요청을받는 방법을 결정할 수 있다면 나에게 메시지를 보낼 수 있습니다. 감사합니다 – Magrangs

답변

1

, 그것은 보인다. 예를 들어, 다음과 같은 요청에 경로가/{세입자}/OAuth2를/2.0/허가 ...

https://login.microsoftonline.com/{tenant}/oauth2/authorize?client_id={clientid}&redirect_uri=https:%2f%2flogin.microsoftonline.com%2fte%2f{tenant}%2foauth2%2fauthresp&response_type=id_token&response_mode=form_post&nonce={nonce}&state=StateProperties 

이 때문에해야합니다, 당신은 당신의 애플 리케이션 모두에서 예기치 않은 동작을 받고있어 . 이는 또한 사용중인 응용 프로그램이 B2C 포털을 사용하여 생성되지 않았 음을 의미합니다 (우리는 오프라인 채팅을 통해이를 확인했습니다).

지금까지 B2C는 B2C 포털을 통해 생성 된 응용 프로그램 만 지원합니다. 따라서 B2C 포털을 통해 응용 프로그램을 만들어 다시 시도 할 수 있다면이 문제가 해결되어야합니다.

+0

이것은 우리의 문제를 해결 한 것으로 보입니다. – Magrangs

+0

앱 등록을 처음 만들었을 때 v1 엔드 포인트에서 생성되었습니다. 이 트릭은 Omer의 설명에 따라 b2c 포털에 앱을 만드는 것이 었습니다. 그런 다음 '지금 시도하십시오'버튼을 사용하여 호출해야하는 URL을 볼 수 있습니다. – Magrangs

+0

또한 웹 API 구성이 v2.0 정책 끝점을 사용하는지 확인하십시오. 즉 https://login.microsoftonline.com/{0}/v2.0/.well-known/openid-configuration?p={1} (0은 거주자, 1은 정책) – Magrangs