[英]Accessing Azure Active directory users and roles
As Azure REST APIs helps to retrieve the users and corresponding roles information at subscription level. 由于Azure REST API有助于在订阅级别检索用户和相应角色信息。
I would like to know that I have manually created a few users and assigned them different roles in Azure Active directory and i want to access those information from azure active directory through REST API calls or in a programmatic way. 我想知道我已经手动创建了一些用户,并在Azure Active Directory中为他们分配了不同的角色,我想通过REST API调用或以编程方式从Azure活动目录中访问这些信息。
How can I access that information at azure active directory level to retrieve the user list ? 如何在Azure活动目录级别访问该信息以检索用户列表? is there any API calls available ?
有没有可用的API调用? what about GRAPH API on this scenario and how it can be used ?
GRAPH API在这种情况下又如何使用呢?
Please input your suggestions. 请输入您的建议。 Thanks All !
谢谢大家!
Yes, you can do this via the REST API. 是的,您可以通过REST API执行此操作。
There are two APIs available: 有两种可用的API:
You should go with the new graph.microsoft.com API (check whether the new API covers all your requirements). 您应该使用新的 graph.microsoft.com API(检查新API是否满足您的所有要求)。
See Working with users in Microsoft Graph 请参阅使用Microsoft Graph中的用户
You can use Microsoft Graph to list all users: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/user_list 您可以使用Microsoft Graph列出所有用户: https : //developer.microsoft.com/zh-cn/graph/docs/api-reference/v1.0/api/user_list
https://graph.microsoft.com/v1.0/users/
You can give it a try with the Graph Explorer at https://developer.microsoft.com/en-us/graph/graph-explorer 您可以在https://developer.microsoft.com/zh-cn/graph/graph-explorer上使用Graph Explorer进行尝试
You will need an access token to call Microsoft Graph, more information about obtaining an access token can be found here: https://developer.microsoft.com/en-us/graph/docs/concepts/auth_overview 您将需要访问令牌才能调用Microsoft Graph,有关获取访问令牌的更多信息,请参见: https : //developer.microsoft.com/zh-cn/graph/docs/concepts/auth_overview
You could use the Azure AD Graph API to retrieve users list and corresponding roles by using GET https://graph.windows.net/myorganization/users?api-version=1.6
. 您可以通过使用
GET https://graph.windows.net/myorganization/users?api-version=1.6
来使用Azure AD Graph API检索用户列表和相应的角色。 For the details, please read here . 有关详细信息,请在此处阅读。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.