我想使用 postman 获取 Azure AD 实例内的用户列表。如果有人这样做了,请告诉我该 URL 和凭据详细信息。
最佳答案
请求网址:
https://graph.windows.net/YourTenant.onmicrosoft.com/users?api-version=1.6
您还可以尝试使用租户 ID:
https://graph.windows.net/3deed68b_Tenant_ID_ef7cfbe/users?api-version=1.6
您还可以应用自定义查询SELECT
https://graph.windows.net/YourTenant.onmicrosoft.com/users?api-version=1.6&$select=id,mail,userType,userPrincipalName
您还可以应用自定义查询SELECT
和$filter
https://graph.windows.net/YourTenant.onmicrosoft.com/users?api-version=1.6&$select=id,mail,userType,userPrincipalName&$filter=userPrincipalName eq '<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b2d3d6dfdbdcf2d7c0dbd1dfded3d09cdddcdfdbd1c0ddc1ddd4c69cd1dddf" rel="noreferrer noopener nofollow">[email protected]</a>'
凭据详细信息:
您需要设置以下请求权限凭据:
设置步骤:
步骤:1
步骤:2
步骤:3
添加权限后,您必须授予同意
,如下所示:
现在您可以从 postman 处调用它了。
postman 示例:
1。仅用户示例
2。具有自定义查询的用户
注意:
有关更多详细信息,您可以引用以下资源
关于azure - 从 postman 获取 Azure AD 实例内的用户的用户列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57110163/