Microsoft Graph通过一个终结点从 Office 365 和其他 Microsoft 云服务公开了多个 API:https://graph.microsoft.com。Microsoft Graph 简化了本来会更加复杂的查询。
可以使用 Microsoft Graph 执行以下操作:
Microsoft Graph 开发堆栈

Microsoft Graph 公开了两个终结点:/v1.0 和 /beta。/V1.0 终结点包括可在生产应用中访问的资源。 /beta 终结点包含当前处于预览状态的 API。下表列出了一些可用于访问 Microsoft Graph API 的常见查询。
| 操作 | 服务终结点 |
|---|---|
| 获取我的个人资料 | https://graph.microsoft.com/v1.0/me |
| 获取我的文件 | https://graph.microsoft.com/v1.0/me/drive/root/children |
| 获取我的照片 | https://graph.microsoft.com/v1.0/me/photo/$value |
| 获取我的邮件 | https://graph.microsoft.com/v1.0/me/messages |
| 获取我的高重要性的邮件 | https://graph.microsoft.com/v1.0/me/messages?$filter=importance%20eq%20'high' |
| 获取我的日历 | https://graph.microsoft.com/v1.0/me/calendar |
| 获取我的经理 | https://graph.microsoft.com/v1.0/me/manager |
| 获取上一个修改文件 foo.txt 的用户 | https://graph.microsoft.com/v1.0/me/drive/root/children/foo.txt/lastModifiedByUser |
| 获取我隶属于的统一组 | https://graph.microsoft.com/v1.0/me/memberOf/$/microsoft.graph.group?$filter=groupTypes/any(a:a%20eq%20'unified') |
| 获取我组织中的用户 | https://graph.microsoft.com/v1.0/users |
| 获取群组聊天 | https://graph.microsoft.com/v1.0/groups/{id}/conversations |
| 获取与我相关的人员 | https://graph.microsoft.com/beta/me/people |
| 获取我常用的项目 | https://graph.microsoft.com/beta/me/insights/trending |
| 获取我的任务 | https://graph.microsoft.com/beta/me/tasks |
| 获取我的注释 | https://graph.microsoft.com/beta/me/notes/notebooks |
注意:beta 终结点中的 API 可能会发生更改。建议不要在生产应用中使用它们。
我们非常重视你的反馈。请在 Stack Overflow 上与我们联系。使用 {MicrosoftGraph} 和 {office365} 标记出你的问题。