Office 365 API获取用户详细信息 [英] Office 365 API get user details

查看:516
本文介绍了Office 365 API获取用户详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用网址时

https://outlook.office365.com/EWS/OData/Users

我可以吸引公司中的所有用户,但是如何获得有关特定用户的更多详细信息?

I can get all users in a company, but how can I get more details about a specific user?

例如Contacts中的内容:

https://outlook.office365.com/EWS/OData/Me/Contacts

Users(EmailAliasDisplayName)中给出的信息很少.如果我需要获取用户的电话或公司名称等信息怎么办?还有其他方法吗?

There is very little information given in Users (Email, Alias, DisplayName). What if I need to get a user's phone or company name and so on? Are there any other ways?

推荐答案

这实际上是两件事. 用户"节点不可获取",您必须以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.

这篇关于Office 365 API获取用户详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆