Azure AD + ADAL.js +应用程序服务-仅对ClaimsPrincipal.Current.Claims提出一项索赔 [英] Azure AD + ADAL.js + App Service - Only one claim on ClaimsPrincipal.Current.Claims

查看:94
本文介绍了Azure AD + ADAL.js +应用程序服务-仅对ClaimsPrincipal.Current.Claims提出一项索赔的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我面临一个与Azure AD和Azure App Service(Web App)有关的非常奇怪的问题。我有一个用Angular 1.5 + ADAL.JS,WebAPI(托管在App Service上)和Azure AD构建的SPA。

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.

我已经在Azure AD目录中创建了两个应用程序:

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

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

登录和注销工作流在本地和Azure上运行良好。但是,当我在Azure上运行并检查用户是否为组成员时,ClaimsPrincipal.Current.Claims仅具有一个Claim。 (由于远程调试,我发现了它)

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)

奇怪的是,使用fiddler上的composer选项卡并重播了请求,但只是更改为localweb api,我收到了所有预期的索赔。

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:我的本地webapi和在App Service上发布的版本相同。

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

有任何线索吗?

推荐答案

在研究了多个问题之后,我意识到发布配置文件覆盖了我的ida:Audience设置web.config。

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

这篇关于Azure AD + ADAL.js +应用程序服务-仅对ClaimsPrincipal.Current.Claims提出一项索赔的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆