MsGraphAuthProvider class

Warning

This API is now deprecated.

Use TokenCredentialAuthenticationProvider from @microsoft/microsoft-graph-client/authProviders/azureTokenCredentials instead.

Microsoft Graph auth provider for Teams Framework

Constructors

MsGraphAuthProvider(TeamsFxConfiguration, string | string[])

Constructor of MsGraphAuthProvider.

MsGraphAuthProvider(TokenCredential, string | string[])

Constructor of MsGraphAuthProvider.

Methods

getAccessToken()

Get access token for Microsoft Graph API requests.

Constructor Details

MsGraphAuthProvider(TeamsFxConfiguration, string | string[])

Constructor of MsGraphAuthProvider.

new MsGraphAuthProvider(teamsfx: TeamsFxConfiguration, scopes?: string | string[])

Parameters

teamsfx

TeamsFxConfiguration

Used to provide configuration and auth.

scopes

string | string[]

The list of scopes for which the token will have access.

MsGraphAuthProvider(TokenCredential, string | string[])

Constructor of MsGraphAuthProvider.

new MsGraphAuthProvider(credential: TokenCredential, scopes?: string | string[])

Parameters

credential
TokenCredential

credential used to provide configuration and auth.

scopes

string | string[]

The list of scopes for which the token will have access.

Method Details

getAccessToken()

Get access token for Microsoft Graph API requests.

function getAccessToken(): Promise<string>

Returns

Promise<string>

Access token from the credential.