繁体   English   中英

如何使用 microsoft graph api 获取 azure 广告用户属性

[英]How to get azure ad user properties using microsoft graph api

我在azure ad中保存了一些用户,现在尝试获取用户的属性。 为此,我在 api 下面使用:

1. https://graph.microsoft.com/v1.0/users/

文档: https://docs.microsoft.com/en-us/graph/api/user-get?view=graph-rest-1.0&tabs=http

上面的 API 响应的是默认属性,所以如果你想获得更多的属性,你必须在请求中特别提到它们,例如:

2. https://graph.microsoft.com/v1.0/users/?$select=userPrincipalName,givenName,surname,businessPhones,officeLocation,companyName

现在上面的 api 给了我适当的回应,但它只列出了第一页上的用户。 如果您想获取所有用户的列表,那么您需要在请求中提及top ,例如:

3. https://graph.microsoft.com/v1.0/users?$top=998

以上 api 会给你所有的用户列表。 但我无法理解如何合并23以便它为我提供所有用户列表,但我提到的属性除外。 谢谢

试试这个:

GET https://graph.microsoft.com/v1.0/users/?$select=userPrincipalName,givenName,surname,businessPhones,officeLocation,companyName&$top=998

使用&连接所有查询参数

结果: 在此处输入图像描述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM