Microsoft Graph 概述Overview of Microsoft Graph

Microsoft Graph 是 Microsoft 365 中通往数据和智能的网关。Microsoft Graph is the gateway to data and intelligence in Microsoft 365. 它提供统一的可编程模型,可用于访问 Office 365、Windows 10 和企业移动性 + 安全性中的海量数据。It provides a unified programmability model that you can use to access the tremendous amount of data in Office 365, Windows 10, and Enterprise Mobility + Security. 利用 Microsoft Graph 中的大量数据针对与数百万名用户交互的组织和客户构建应用。Use the wealth of data in Microsoft Graph to build apps for organizations and consumers that interact with millions of users.

为 Microsoft 365 平台助力Powering the Microsoft 365 platform

Microsoft Graph、Microsoft Graph 数据连接和 Microsoft Graph 连接器可实现广泛的 Microsoft 365 体验,还能构建智能应用。

在 Microsoft 365 平台中,这三大组件让数据访问和传输变得轻松:In the Microsoft 365 platform, three main components facilitate the access and flow of data:

  • Microsoft Graph API 提供了单个终结点 https://graph.microsoft.com,它让你能够访问作为 Microsoft 365 服务资源公开的、以人为中心的丰富数据和见解。The Microsoft Graph API offers a single endpoint, https://graph.microsoft.com, to provide access to rich, people-centric data and insights exposed as resources of Microsoft 365 services. 你可使用 REST API 或 SDK 来访问终结点并构建支持横跨生产力、协作、教育、安全性、标识、访问和设备管理等场景的应用。You can use REST APIs or SDKs to access the endpoint and build apps that support scenarios spanning across productivity, collaboration, education, security, identity, access, device management, and much more.
  • Microsoft Graph 数据连接提供了一组工具,让你能向热门的 Azure 数据存储安全、可扩展性地交付 Microsoft Graph 数据。Microsoft Graph data connect provides a set of tools to streamline secure and scalable delivery of Microsoft Graph data to popular Azure data stores. 此缓存数据充当 Azure 开发工具的数据源,可用于构建智能应用程序。This cached data serves as data sources for Azure development tools that you can use to build intelligent applications.
  • Microsoft Graph 连接器(个人预览版)在数据引入方向中发挥作用,它将外部数据传输到 Microsoft Graph 服务和应用程序中,并增强自定义体验。Microsoft Graph connectors (private preview) works in the incoming direction, delivering external data into Microsoft Graph services and applications and enhancing custom experiences.

Microsoft Graph API、数据连接和连接器(个人预览版)三者结合,可为 Microsoft 365 平台助力。Together, the Microsoft Graph API, data connect, and connectors (private preview) power the Microsoft 365 platform. 借助可访问 Microsoft Graph 数据和其他见解来获得见解和分析结果的能力,你可扩展 Microsoft 365 体验,或构建唯一而智能的应用程序。With the ability to access Microsoft Graph data and other datasets to derive insights and analytics, you can extend Microsoft 365 experiences, or build unique, intelligent applications.

备注

Microsoft Graph 连接器现为个人预览版。Note: Microsoft Graph connectors is in private preview. 仅可受邀参与预览版计划。Participation in the preview program is by invitation only. 有关连接器的详细信息,请参阅 Build 2019 大会:Microsoft Graph 为 Microsoft 365 平台助力For more information about the connectors, see Build 2019: Microsoft Graph powers the Microsoft 365 platform.

Microsoft Graph 提供了哪些内容?What's in Microsoft Graph?

Microsoft Graph 公开了 REST API 和客户端库,它们可访问以下 Microsoft 365 服务上的数据:Microsoft Graph exposes REST APIs and client libraries to access data on the following Microsoft 365 services:

  • Office 365 服务:Delve、Excel、Microsoft Bookings、Microsoft Teams、OneDrive、OneNote、Outlook/Exchange、Planner 和 SharePointOffice 365 services: Delve, Excel, Microsoft Bookings, Microsoft Teams, OneDrive, OneNote, Outlook/Exchange, Planner, and SharePoint
  • 企业移动性 + 安全性服务:高级威胁分析、高级威胁防护、zure Active Directory、Identity Manager 和 IntuneEnterprise Mobility and Security services: Advanced Threat Analytics, Advanced Threat Protection, Azure Active Directory, Identity Manager, and Intune
  • Windows 10 服务:活动、设备和通知Windows 10 services: activities, devices, notifications
  • Dynamics 365 Business CentralDynamics 365 Business Central

要了解详细信息,请参阅 Microsoft Graph 中的主要服务和功能To find out more, see Major services and features in Microsoft Graph.

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

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

使用 Microsoft Graph 围绕用户的唯一上下文构建体验,帮助他们提高工作效率。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 managers, as well as information about the latest documents they're working on, and people they're collaborating with.
  • 扫描你的日历,并为下一次团队会议提出最佳时间建议。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.
  • 分析大量 Office 365 数据,让决策者们能将宝贵的见解转化成能提升业务生产力的时间分配和协作模式中。Analyzes at-scale Office 365 data so that decision makers can unlock valuable insights into time allocation and collaboration patterns that improve business productivity.
  • 将自定义业务数据引入到 Microsoft Graph,编制相关索引,使其可与来自 Microsoft 365 服务的数据一起供用户搜索。Brings custom business data into Microsoft Graph, indexing it to make it searchable along with data from Microsoft 365 services.

以搜索与会者的第一个场景为例。Pick the first scenario about researching meeting attendees as an example. 借助 Microsoft Graph API,你可执行以下操作:With the Microsoft Graph API, you can:

  1. 获取会议活动与会者的电子邮件地址。Get the email addresses of the meeting event attendees.
  2. 在 Azure Active Directory 将其单独作为用户进行查找,或者获取他们的个人资料信息Look them up individually as a user in Azure Active Directory to get their profile information.

然后,可顺着人际关系导航到其他联系人:You can then navigate to other resources using relationships:

Microsoft Graph 不断向开发人员开放 Microsoft 365 平台,且始终仅使用适当的全向。Microsoft Graph continues to open up the Microsoft 365 platform for developers, and always only with the appropriate permissions.

备注

使用 Microsoft Graph API 即表示你同意 Microsoft API 使用条款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 Graph 数据连接大规模地访问 Microsoft Graph 数据Access Microsoft Graph data at scale using Microsoft Graph data connect

Microsoft Graph 数据连接提供了一套工具来大规模地访问 Microsoft Graph 上的数据,同时让管理员能够精细地同意和全面掌控其 Microsoft Graph 数据。Microsoft Graph data connect provides a set of tools to access data on Microsoft Graph at scale, while allowing administrators granular consent and full control over their Microsoft Graph data. 通过数据连接,可更轻松地将此数据传递到 Microsoft Azure。Data connect streamlines the delivery of this data to Microsoft Azure.

之后,可使用 Azure 工具构建能实现以下功能的智能应用:Using Azure tools, you can then 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 API 或数据连接?When should I use Microsoft Graph API or 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. 数据连接提供了一套独一无二的工具,它们简化了智能应用程序的构建,且所有操作均在 Microsoft 云端完成。Data connect provides a unique set of tools 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 数据连接了解详细信息,并开始使用 Microsoft Graph 数据连接See Microsoft Graph data connect for more information, and get started using Microsoft Graph data connect.

后续步骤Next steps