使用 Microsoft Graph 构建 SharePoint 框架应用程序

本教程向您介绍如何构建使用 Microsoft Graph API 检索用户的日历信息的 SharePoint 客户端 web 部件This tutorial teaches you how to build a SharePoint client-side web part that uses the Microsoft Graph API to retrieve calendar information for a user.

提示

如果您只想下载已完成的教程,可以下载或克隆 GitHub 存储库If you prefer to just download the completed tutorial, you can download or clone the GitHub repository.

必备条件Prerequisites

在开始本教程之前,您应在开发计算机上安装以下工具。Before you start this tutorial, you should have the following tools installed on your development machine.

您可以在 设置 Sharepoint 框架开发环境中找到有关 sharepoint 框架开发要求的更多详细信息。You can find more details about requirements for SharePoint Framework development at Set up your SharePoint Framework development environment.

重要

SharePoint 框架需要 Node.js 版本10。SharePoint Framework requires Node.js version 10.x. 请务必安装正确的版本。Be sure to install the correct version.

此外,还应具有 Microsoft 工作或学校帐户,并访问同一组织中的全局管理员帐户。You should also have a Microsoft work or school account, with access to a global administrator account in the same organization. 如果你没有 Microsoft 帐户,可以 注册 office 365 开发人员计划 以获取免费的 office 365 订阅。If you don't have a Microsoft account, you can sign up for the Office 365 Developer Program to get a free Office 365 subscription.

您的 Microsoft 365 租户应 设置为 SharePoint Framework 开发,并在开始本教程之前创建应用程序目录和测试网站。Your Microsoft 365 tenant should be setup for SharePoint Framework development, with an app catalog and testing site created before you start this tutorial.

备注

本教程是使用上述工具的以下版本编写的。This tutorial was written with the following versions of the above tools. 本指南中的步骤可能适用于其他版本,但尚未经过测试。The steps in this guide may work with other versions, but that has not been tested.

  • Node.js 10.22。0Node.js 10.22.0
  • Yeoman 3.1。1Yeoman 3.1.1
  • Gulp 4.0。2Gulp 4.0.2
  • Yeoman SharePoint 生成器1.11。0Yeoman SharePoint generator 1.11.0

反馈Feedback

请在 GitHub 存储库中提供有关本教程的任何反馈。Please provide any feedback on this tutorial in the GitHub repository.