Overview of the Office Add-in Microsoft Graph React sample
mainThis sample demonstrates how to build a single-page application (SPA) Office Add-in with no backend that connects to Microsoft Graph. It uses React, MSAL.js, and Office.js to perform the following workflow:
- Connects to Microsoft Graph using the OAuth 2.0 Auth Code Flow with PKCE.
- Uses the MSAL.js library for authentication.
- Accesses OneDrive for Business via Microsoft Graph REST APIs to find the first three workbooks.
- Fetches filenames from those workbooks.
- Inserts the filenames into an Office document using
Office.js.
This sample is specifically designed for Excel on Windows (one-time purchase and subscription).