You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Now you can add any component in your HTML page or in your `render()` method when using React and it will use the TeamsFx context to access Microsoft Graph.
19
+
1. Initialize the provider and login to get the required access token
20
+
21
+
### Use TeamsUserCredential (Recommended)
22
+
23
+
1. Initialize the provider inside your component.
24
+
```ts
25
+
// Import the providers and credential at the top of the page
26
+
import {Providers} from '@microsoft/mgt-element';
27
+
import {TeamsFxProvider} from '@microsoft/mgt-teamsfx-provider';
28
+
import {TeamsUserCredential, TeamsUserCredentialAuthConfig} from "@microsoft/teamsfx";
1. Now you can add any component in your HTML page or in your `render()` method when using React and it will use the TeamsFx context to access Microsoft Graph.
0 commit comments