通过Azure AD进行身份验证时公开扩展属性-Azure AD中的声明感知应用程序

时间:2018-07-23 21:14:53

标签: asp.net-mvc-5 azure-active-directory claims-based-identity

所以我的组织使用了几年前开发的一些内部软件。我们最初使用WS-Fed将其构建为具有ADFS声明意识。为了正常工作,该软件需要两件事,即用户的组成员身份和用户的雇员编号(我们将其用作使用的许多不同应用程序的密钥)。

从那时起,我们已经迁移到Azure AD(维护我们的本地AD服务器,并与Azure AD定期同步它们)。

现在,我已经开始进行身份验证,并且通过将应用程序清单更改为以下内容,我设法将组暴露给应用程序:

enter image description here

组成员使用蓝色的AD密钥标识符,而不是公开组的文本名称,但这很好,我可以找出映射关系。

我还从Microsoft指南中借来了一个方便的调试页面,这样我就可以看到针对每个用户的所有声明:

enter image description here

问题是,如何编辑清单以便可以看到'employeeID'属性。另一个选项是显示“ extensionattribute2”。我们使用一些可以看到这些属性的第三方软件,因此必须可行。

通过清单执行此操作是否正确?我是否需要与Microsoft Graph进行交互才能解决此问题?

编辑:

因此,在进一步研究中,我发现this,这使我怀疑需要使用Graph API来获取此信息。我在那里正确吗?

enter image description here

1 个答案:

答案 0 :(得分:0)

Question is, how do I edit the manifest such that I can see the 'employeeID' attribute. The other option is to show 'extensionattribute2'. We use some third party software that can see these attributes, so it must be possible.

Based on my experience, it seems that we cann't do that with adding the content in the manifest.

I try to registry a Directory schema extension via Graph API and the added a custom claim to my users. If we can get the same result via modifying azure app manifest,the content of manifest should reflect the extension details which I have registered, and next time we can follow the changed parts to modify the manifest to register Directory schema extension and add customized claims.

However, after I compared the manifest before register extension and after register extension, there is no differences.

It seems that modifying the manifest of azure app is not working.

But you could use graph API to register Directory schema extension as customized claims, for more information please please refer to Directory schema extensions | Graph API concepts