Microsoft Graph 概述Overview of Microsoft Graph

Microsoft Graph 是 Microsoft 365 中数据和智能的网关。Microsoft Graph is the gateway to data and intelligence in Microsoft 365. Microsoft Graph 提供了统一的可编程性模型,通过该模型可利用 Office 365、企业移动性 + 安全性和 Windows 10 中的大量数据。Microsoft Graph provides a unified programmability model that you can use to take advantage of the tremendous amount of data in Office 365, Enterprise Mobility + Security, and Windows 10.

Microsoft Graph API 可用于为组织和消费者生成应用,与数百万用户的数据进行交互。You can use the Microsoft Graph API to build apps for organizations and consumers that interact with the data of millions of users. 使用 Microsoft Graph,可以与丰富的资源、关系和智能相连接,所有这些均通过单个终结点实现:https://graph.microsoft.comWith Microsoft Graph, you can connect to a wealth of resources, relationships, and intelligence, all through a single endpoint: https://graph.microsoft.com.

Graph 中有什么?What's in the graph?

Microsoft Graph 公开了 REST API 和客户端库,用于访问以下数据:Microsoft Graph exposes REST APIs and client libraries to access data on the following:

  • Azure Active DirectoryAzure Active Directory
  • Office 365 服务:SharePoint、OneDrive、Outlook/Exchange、Microsoft Teams、OneNote、Planner 和 ExcelOffice 365 services: SharePoint, OneDrive, Outlook/Exchange, Microsoft Teams, OneNote, Planner, and Excel
  • 企业移动性和安全性服务:Identity Manager、Intune、高级威胁分析和高级威胁防护。Enterprise Mobility and Security services: Identity Manager, Intune, Advanced Threat Analytics, and Advanced Threat Protection.
  • Windows 10 服务:活动和设备Windows 10 services: activities and devices
  • 教育Education

要了解更多内容,请参阅 Microsoft Graph 中的主要服务和功能To find out more, see Major services and features in Microsoft Graph.

Microsoft Graph 通过关系连接这些服务中的所有资源。Microsoft Graph connects all the resources across these services using relationships. 例如,用户可通过 memberOf 关系连接到某个组,也可以通过 manager 关系连接到其他用户。For example, a user can be connected to a group through a memberOf relationship, and to another user through a manager relationship. 你的应用可以遍历这些关系来访问这些连接的资源,并通过 API 对其执行操作。Your app can traverse these relationships to access these connected resources and perform actions on them through the API.

此外,你还可以从 Microsoft Graph 中获取与数据相关的有价值的见解和情报。You can also get valuable insights and intelligence about the data from Microsoft Graph. 例如,你可以获得特定用户的常用文件,或者获取与用户相关度最高的人员For example, you can get the popular files trending around a particular user, or get the most relevant people around a user.

在 Microsoft Graph 中发现关系的可能性。Discover the possibilities in the relationships within Microsoft Graph.

显示作为 Graph 一部分的主要资源和关系的图片

可以使用 Microsoft Graph 执行哪些操作?What can you do with Microsoft Graph?

可以使用 Microsoft Graph 为用户构建独特的周围环境体验,帮助他们提高工作效率。想象一下,一个应用可以...You can use Microsoft Graph to build experiences around the user's unique context to help them be more productive. Imagine an app that...

  • 查看你的下一次会议,并通过提供与会者的个人资料信息帮助你准备会议,包括他们的职务、工作伙伴以及关于最近处理的文档和项目的信息。Looks at your next meeting and helps you prepare for it by providing profile information for attendees, including their job titles and who they work with, as well as information about the latest documents and projects they're working on.
  • 扫描你的日历,并为下一次团队会议提出最佳时间建议。Scans your calendar, and suggests the best times for the next team meeting.
  • 从 OneDrive 中的 Excel 文件获取最新销售预测图表,让你可以实时更新趋势预测,这一切通过手机就可以实现。Fetches the latest sales projection chart from an Excel file in your OneDrive and lets you update the forecast in real time, all from your phone.
  • 订阅日历更改、当你在会议上花费太长时间时发出警报,还可以根据与会者和你的相关度,为可能错过或委派的会议提供建议。Subscribes to changes in your calendar, sends you an alert when you’re spending too much time in meetings, and provides recommendations for the ones you can miss or delegate based on how relevant the attendees are to you.
  • 帮助你整理手机上的个人和工作信息;例如,对应当归到个人 OneDrive 的照片和应当归到 OneDrive for Business 的业务收据进行分类。Helps you sort out personal and work information on your phone; for example, by categorizing pictures that should go to your personal OneDrive and business receipts that should go to your OneDrive for Business.

使用 Microsoft Graph API,你可以实现这些功能及其他更多功能。You can do all this and more with the Microsoft Graph API.

注意: 使用 Microsoft Graph API 时,表示你同意 Microsoft Graph 使用条款Microsoft 隐私声明Note: When you use the Microsoft Graph API, you agree to the Microsoft Graph Terms of Use and the Microsoft Privacy Statement.

查看可与 Microsoft Graph API 结合使用的某些常见方案。Check out some of these common scenarios for working with the Microsoft Graph API. 这些链接可带你前往 Graph 浏览器The links take you to the Graph Explorer.

操作Operation URLURL
获取我的个人资料GET my profile https://graph.microsoft.com/v1.0/me
获取我的文件GET my files https://graph.microsoft.com/v1.0/me/drive/root/children
获取我的照片 GET my photo https://graph.microsoft.com/v1.0/me/photo/$value
获取我的邮件GET my mail https://graph.microsoft.com/v1.0/me/messages
获取我的高重要性的邮件GET my high importance email https://graph.microsoft.com/v1.0/me/messages?$filter=importance%20eq%20'high'
获取我的日历事件GET my calendar events https://graph.microsoft.com/v1.0/me/events
获取我的经理GET my manager https://graph.microsoft.com/v1.0/me/manager
获取上一个修改文件 foo.txt 的用户GET last user to modify file foo.txt https://graph.microsoft.com/v1.0/me/drive/root/children/foo.txt/lastModifiedByUser
获取我所属的 Office365 组GET Office365 groups I’m member of https://graph.microsoft.com/v1.0/me/memberOf/$/microsoft.graph.group?$filter=groupTypes/any(a:a%20eq%20'unified')
获取我组织中的用户GET users in my organization https://graph.microsoft.com/v1.0/users
获取我组织中的组GET groups in my organization https://graph.microsoft.com/v1.0/groups
获取与我相关的人员GET people related to me https://graph.microsoft.com/v1.0/me/people
获取我常用的项目GET items trending around me https://graph.microsoft.com/beta/me/insights/trending
获取我的笔记GET my notes https://graph.microsoft.com/v1.0/me/onenote/notebooks

批量访问 Microsoft GraphAccess Microsoft Graph at scale

Microsoft Graph 数据连接提供了对 Office 365 数据的批量访问权限,而不是传统的事务访问权限。Microsoft Graph Data Connect enables bulk - rather than the traditional transactional - access to Office 365 data. 借助批量 Office 365 数据,可使用 Azure 工具生成具有以下功能的智能应用:With the bulk Office 365 data, you can use Azure tools to build intelligent apps that:

  • 为你在组织中查找与某主题最相关的专家Find you the closest expert on a topic to you in your organization
  • 自动执行知识库创建Automate knowledge base creation
  • 分析会议请求,以提供会议室利用率方面的见解Analyze meeting requests to provide insights into conference room utilization
  • 检测生产力和通信数据欺诈Detect fraud with productivity and communication data

我应何时使用 Microsoft Graph 数据连接?When should I use Microsoft Graph Data Connect?

使用 Microsoft Graph 数据连接,可以一种新方式与通过 Microsoft Graph API 公开的数据进行交互。Microsoft Graph Data Connect provides a new way for you to interact with the data that's available through Microsoft Graph APIs. 除了提供对 Office 365 数据的可缩放访问权限以外,Microsoft Graph 数据连接还提供一组独特功能,用于简化智能应用的生成过程,所有这些都是在 Microsoft 云中完成。In addition to providing scalable access to Office 365 data, Microsoft Graph Data Connect also provides a unique set of capabilities that streamline the building of intelligent applications, all within the Microsoft cloud.

功能Feature Microsoft Graph APIMicrosoft Graph API Microsoft Graph 数据连接Microsoft Graph Data Connect
访问范围Access scope 单个用户或整个租户Single user or entire tenant 多个用户或组Many users or groups
访问模式Access pattern 实时Real time 定期重复Recurrent schedule
数据操作Data operations 对主数据执行操作Operates on data master 对数据缓存执行操作Operates on a cache of the data
数据保护Data protection 保护 Microsoft 365 中的数据Data is protected while in Microsoft 365 数据保护延伸至 Azure 订阅中的数据缓存Data protection is extended to the cache of data in your Azure subscription
用户同意User consent 自我Self
资源类型Resource types
None
管理员同意Admin consent 整个组织Entire organization
资源类型Resource types
选择用户组Select groups of users
资源类型和属性Resource types and properties
排除用户Excludes users
访问工具Access tools RESTful Web 查询RESTful web queries Azure 数据工厂Azure Data Factory

若要详细了解 Microsoft Graph 数据连接,请参阅 Microsoft Graph 数据连接For more information about Microsoft Graph Data Connect, see Microsoft Graph Data Connect. 首先,请参阅 Microsoft Graph 数据连接概述To get started, see Overview of Microsoft Graph Data Connect.

后续步骤Next steps