且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Office 365 API获取用户详细信息

更新时间:2023-12-04 08:50:22

这实际上是两件事. 用户"节点不可获取",您必须以SMTP地址的形式提供用户ID,例如:

These are actually two different things. The Users node isn't "GET"-able, you have to supply a user ID in the form of an SMTP address, like:

GET https://outlook.office365.com/ews/odata/Users("sadie@contoso.com")

Contacts API仅用于访问个人联系人(用户已将其存储在其邮箱的联系人"文件夹中的联系人).

The Contacts API is used to access personal contacts only (the contacts a user has stored in their Contacts folder in their mailbox).

听起来好像您想在组织中看到用户,在这种情况下,您想使用 Azure AD Graph API . Office 365的用户信息存储在Azure AD中.

It sounds like you want to see users in the organization, in which case you want to use the Azure AD Graph API. The user information for Office 365 is stored in Azure AD.