如何从Azure活动目录中获取邮递员中的用户声明?

时间:2019-04-02 11:29:27

标签: azure azure-active-directory

我在Azure AD帐户中添加了一些用户,我想通过以声明的形式从Postman调用Azure API来获取有关这些用户的信息。我尝试使用以下参数调用以下URL:

https://login.microsoftonline.com/myTenantId/oauth2/token

身体: grant_type:client_credentials, client_id:客户端ID, 客户机密:客户机密

我在响应中收到编码格式的access_token,当我在https://jwt.io/上对其进行解码时,我看到了解码后的数据,但是access_token中没有用户信息。

我想在回复中以声明的形式获取用户信息。

我需要采取什么方法?

enter image description here

1 个答案:

答案 0 :(得分:0)

如果要获取令牌中的用户信息,则应将grant_type更改为password。并在正文中提供用户名和密码。

enter image description here

这是用户屏幕截图。 enter image description here