简体   繁体   English

是否可以通过Azure AD Graph API或Microsoft Graph API在租户中获取所有用户信息?

[英]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和新密码在客户端或服务器中间件应用程序中充当clientIDclientSecret

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.

相关问题 如何使用 microsoft graph api 获取 azure 广告用户属性 - How to get azure ad user properties using microsoft graph api Microsoft Azure AD Graph API:获取用户的按比例分配的许可证信息 - Microsoft Azure AD Graph API: Fetch pro-rated license informations of users 如何使用microsoft graph api为azure ad中的用户分配角色 - How to use microsoft graph api for assigning role to the user in azure ad 使用Microsoft graph API或Azure AD graph API从用户界面中删除对用户的应用程序访问 - Removing application access to user from User interface by using Microsoft graph API or Azure AD graph api 无法使用 Microsoft Graph 登录 Azure AD 租户的用户 - Cannot get signed in users of Azure AD tenant using Microsoft Graph 带有外部帐户和Microsoft Graph API的Azure AD - Azure AD with external accounts and Microsoft Graph API Azure AD Graph API 和 Microsoft Graph API 有什么区别 - What is the difference between Azure AD Graph API and Microsoft Graph API 如何发布Azure AD Graph API或Microsoft Graph API中的更新 - How updates in Azure AD Graph API or Microsoft Graph API are released Microsoft Azure AD图形API,如何在节点js中使用botbuilder版本4获取响应的用户邮件? - Microsoft Azure AD graph API, How to get the user mail in response with botbuilder version 4 in node js? Microsoft graph api - 无法识别租户 - Microsoft graph api - Tenant not recognized
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM