Auth popup and how to use obtain an access token from cache

AT 41 Reputation points
2022-05-10T11:57:22.007+00:00

Hi,

We're aware teamsfx is not ready for production use as noted here:

https://learn.microsoft.com/en-us/javascript/api/@microsoft/teamsfx/teamsusercredential?view=msteams-client-js-latest#@microsoft-teamsfx-teamsusercredential-login

The TeamsMsal2Provider appears to be the one recommended to use for teams development

Are there any sample code with React to show us how to use trigger the auth popup and how to use obtain an access token from cache?

import { TeamsMsal2Provider } from '@microsoft/mgt-teams-msal2-provider';

https://learn.microsoft.com/en-us/graph/toolkit/providers/teams-msal2?tabs=ts

Regards
Andrew

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,399 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,053 questions
{count} votes