|
| 1 | +import { Meta } from '@storybook/addon-docs/blocks'; |
| 2 | + |
| 3 | +<Meta title="Overview" /> |
| 4 | + |
| 5 | +# Microsoft Graph Toolkit: UI Components and Authentication Providers for Microsoft Graph |
| 6 | + |
| 7 | +The Microsoft Graph Toolkit is a collection of reusable, framework-agnostic components and authentication providers for accessing and working with Microsoft Graph. The components are fully functional right of out of the box, with built in providers that authenticate with and fetch data from Microsoft Graph. |
| 8 | + |
| 9 | +<img src="graff.png" class="docs-img-centered" width="15%"/> |
| 10 | + |
| 11 | +The Microsoft Graph Toolkit makes it easy to use Microsoft Graph in your application. In the following example, a signed in user and their calendar events are displayed with just two lines of code by using the [Login](?path=/story/components-mgt-login--login) and [Agenda](?path=/story/components-mgt-agenda--simple) components. |
| 12 | + |
| 13 | +## Installing the Microsoft Graph Toolkit |
| 14 | + |
| 15 | +It's easy to get started! Add the Toolkit via our `mgt-loader` or via npm and you are ready to go! |
| 16 | + |
| 17 | +### Via the mgt-loader |
| 18 | + |
| 19 | +```html |
| 20 | +<script src="https://unpkg.com/@microsoft/mgt/dist/bundle/mgt-loader.js"></script> |
| 21 | +``` |
| 22 | + |
| 23 | +### Via npm |
| 24 | + |
| 25 | +```shell |
| 26 | +npm i @microsoft/mgt |
| 27 | +``` |
| 28 | + |
| 29 | +## What's in the Microsoft Graph Toolkit? |
| 30 | + |
| 31 | +### Components |
| 32 | + |
| 33 | +The Microsoft Graph Toolkit includes a collection of web components for the most commonly built experiences powered by Microsoft Graph APIs. |
| 34 | + |
| 35 | +The components are also available as [React components](https://docs.microsoft.com/graph/toolkit/get-started/mgt-react). |
| 36 | + |
| 37 | +| Component | Description | |
| 38 | +| ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | |
| 39 | +| [Login](?path=/story/components-mgt-login--login) | A button and a flyout control to authenticate a user with the Microsoft Identity platform and display the user's profile information on sign in. | |
| 40 | +| [Person](?path=/story/components-mgt-person--person) | Displays a person or contact by their photo, name, and/or email address. | |
| 41 | +| [People](?path=/story/components-mgt-people--people) | Displays a group of people or contacts by their photos or initials. | |
| 42 | +| [Agenda](?path=/story/components-mgt-agenda--simple) | Displays events in a user or group's calendar. | |
| 43 | +| [People picker](?path=/story/components-mgt-people-picker--people-picker) | Provides the ability to search for people and renders the list of results. | |
| 44 | +| [Person card](?path=/story/components-mgt-person-card--person-card) | A flyout used on the person component to display more profile information about a user. | |
| 45 | +| [File](?path=/story/components-mgt-file--file) | Represents a file or folder with icon, filename, author, and more. | |
| 46 | +| [File list](?path=/story/components-mgt-file-list--file-list) | Displays a list of multiple files or folders. | |
| 47 | +| [Get](?path=/story/components-mgt-get--get-email) | Make a GET query to any Microsoft Graph API directly in your HTML. | |
| 48 | +| [Teams Channel picker](?path=/story/components-mgt-teams-channel-picker--teams-channel-picker) | Provides the ability to search for Microsoft Teams channels to select a channel from a rendered list of results. | |
| 49 | +| [To Do](?path=/story/components-mgt-todo--tasks) | Displays and enables adding, removing, completing, or editing of tasks from Microsoft To Do. | |
| 50 | +| [Tasks](?path=/story/components-mgt-tasks--tasks) | Displays and enables adding, removing, completing, or editing of tasks from Microsoft Planner or Microsoft To Do. | |
| 51 | + |
| 52 | +### Providers |
| 53 | + |
| 54 | +[Providers](https://docs.microsoft.com/graph/toolkit/providers/providers) enable authentication and provide the implementation for acquiring access tokens on various platforms and expose a Microsoft Graph client for calling the Microsoft Graph APIs. The components work best when used with a provider, but the providers can be used on their own. |
| 55 | + |
| 56 | +| Providers | Description | |
| 57 | +| ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | |
| 58 | +| [MSAL](https://docs.microsoft.com/graph/toolkit/providers/msal) | Uses msal.js to sign in users and acquire tokens to use with Microsoft Graph. | |
| 59 | +| [MSAL2](https://docs.microsoft.com/graph/toolkit/providers/msal2) | Uses msal-browser to sign in users and acquire tokens to use with Microsoft Graph. | |
| 60 | +| [Electron](https://docs.microsoft.com/graph/toolkit/providers/electron) | Authenticates and provides Microsoft Graph access to components inside of Electron apps | |
| 61 | +| [SharePoint](https://docs.microsoft.com/graph/toolkit/providers/sharepoint) | Authenticates and provides Microsoft Graph access to components inside of SharePoint web parts. | |
| 62 | +| [Teams](https://docs.microsoft.com/graph/toolkit/providers/teams) | Uses msal.js to sign in users and acquire tokens on the client in Microsoft Teams tabs. | |
| 63 | +| [Teams MSAL2](https://docs.microsoft.com/graph/toolkit/providers/teams-msal2) | Uses msal-browser to sign in users and acquire tokens in Microsoft Teams tabs. Supports Single Sign-On with custom backend. | |
| 64 | +| [Proxy](https://docs.microsoft.com/graph/toolkit/providers/proxy) | Allows the use of backend authentication by routing all calls to Microsoft Graph through your backend. | |
| 65 | +| [Custom](https://docs.microsoft.com/graph/toolkit/providers/custom) | Create a custom provider to enable authentication and access to Microsoft Graph with your application's existing authentication code. | |
| 66 | + |
| 67 | +## Who should use it? |
| 68 | + |
| 69 | +The Microsoft Graph Toolkit is great for developers of all experience levels looking to develop an app that connects to and accesses data from Microsoft Graph, such as a: |
| 70 | +- Web app |
| 71 | +- Microsoft Teams tab |
| 72 | +- SharePoint web part |
| 73 | +- Progressive Web App (PWA) |
| 74 | +- Electron app |
| 75 | + |
| 76 | +## Where can I use it? |
| 77 | + |
| 78 | +The Microsoft Graph Toolkit is supported in the following browsers. |
| 79 | + |
| 80 | +|  |  |  |  |  |  | |
| 81 | +| --------------------------------------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | |
| 82 | +| **Edge** | **Firefox** | **Chrome** | **Safari** | **Opera** | **Samsung** | |
| 83 | + |
| 84 | + |
| 85 | +## Next steps |
| 86 | + |
| 87 | +- Read our [documentation](https://aka.ms/mgt/docs). |
| 88 | +- [Get started](https://docs.microsoft.com/graph/toolkit/get-started/overview) with the Microsoft Graph Toolkit. |
| 89 | +- Check out the Microsoft Graph Toolkit on [GitHub](https://aka.ms/mgt). |
0 commit comments