如何查询AAD中的ExtensionAttributes的信息

首先我们需要根据tokenurl获取token

tokenUrl:   https://login.microsoftonline.com/{租户id}/oauth2/token POST请求获取token

body的传参如下

grant_type:client_credentials

client_id:应用程序ID

client_secret:应用程序Secret

resource:https://graph.microsoft.com/

 

 

然后通过获取扩展字段URL:https://graph.microsoft.com/v1.0/users/{userAccount}?$select=onPremisesExtensionAttributes Get请求获取扩展字段相关属性信息

Authorization:Bearer {使用提前获取到的token} 

 

posted @ 2022-01-27 15:20  西伯利亚小菜鸟  阅读(64)  评论(0)    收藏  举报