[英]Is it possible to get all the user informations in a tenant by Azure AD Graph API or Microsoft Graph API?
From the Azure Active Directory v2.0 authentication libraries we can see lots of samples about how to use libraries to connect Active Directory. 从Azure Active Directory v2.0身份验证库中,我们可以看到许多有关如何使用库连接Active Directory的示例。 It seems all of them should create an application at apps.dev.microsoft.com first.
似乎所有人都应该首先在apps.dev.microsoft.com上创建一个应用程序。 Then use the
Application ID
and a new password to act the clientID
and clientSecret
in a client or server middleware application. 然后,使用
Application ID
和新密码在客户端或服务器中间件应用程序中充当clientID
和clientSecret
。
This way, one user can use the application to login by oauth 2 or openid through the Azure Active Directory API
. 这样,一个用户可以使用该应用程序通过oauth 2或通过
Azure Active Directory API
openid登录。 Also can get the personal information such as user profile correctly. 也可以正确获取个人信息,例如用户个人资料。
But, if I want to get all the users information in a tenant one time, is there an API can do? 但是,如果我想一次在租户中获取所有用户信息,是否可以使用API?
But, if I want to get all the users information in a tenant one time, is there an API can do?
但是,如果我想一次在租户中获取所有用户信息,是否可以使用API?
You can use Microsoft Graph API - specifically List Users API . 您可以使用Microsoft Graph API(特别是列表用户API) 。
https://graph.microsoft.com/v1.0/users
For a quick test, try using Microsoft Graph Explorer 为了进行快速测试,请尝试使用Microsoft Graph Explorer
Similarly you can list users with Azure AD Graph API as well, but it would be recommended to use Microsoft Graph API . 同样,您也可以使用Azure AD Graph API列出用户,但是建议使用Microsoft Graph API 。
Read Microsoft Graph or Azure AD Graph and this SO Post (Only case to use Azure AD Graph API would be if you need something very specific that you aren't able to achieve with stable version of the newer Microsoft Graph API.) 阅读Microsoft Graph或Azure AD Graph以及本SO帖子 (仅当需要使用Azure Graph API的稳定版本无法实现的非常特定的功能时,才使用Azure AD Graph API。)
Azure AD Graph API to list users (not recommended) Azure AD Graph API列出用户(不推荐)
https://graph.windows.net/myorganization/users
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.