如何将Deparment添加到Azure AD令牌

时间:2020-05-25 14:00:20

标签: azure azureportal claims

我需要阅读Azure广告用户的“部门”。

我检查了资源https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-optional-claims,但这无济于事,因为我找不到任何声明类型来读取“部门”

enter image description here

1 个答案:

答案 0 :(得分:1)

正如您提到的,official doc中没有名为Department的声明,我的解决方法是在Azure AD中为不同部门创建不同的组,将用户添加到不同的组中。

然后使用groups声明:

enter image description here

有关令牌中的团体声明的更多信息,请参见here