Azure AD + ADAL.js + App Service - Only one claim on ClaimsPrincipal.Current.Claims

别来无恙 提交于 2020-01-17 07:52:43

问题


I'm facing a very strange issue related to Azure AD and Azure App Service (Web App). I have a SPA built with Angular 1.5 + ADAL.JS, WebAPI (hosted on App Service) and Azure AD.

I've created two applications into my Azure AD directory:

- one native (SPA)
- one web application (WebAPI).

The Login and Logout workflows are working fine locally and on Azure. However, when I'm running on Azure and checking if an user is member of a group, the ClaimsPrincipal.Current.Claims only have one Claim. (I discovered it thanks to Remote Debbuging)

The strange thing is, using the composer tab on fiddler and replaying the request, but just changing to my localweb api, I receive all the expected claims.

PS: my local webapi and the version published on App Service are the same.

Any clues?


回答1:


After many hours investigating this issue, I realized that the publish profile was overwriting my ida:Audience setting on web.config.



来源:https://stackoverflow.com/questions/40411761/azure-ad-adal-js-app-service-only-one-claim-on-claimsprincipal-current-cla

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!