MsGraphAuthProvider class
Note
This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Microsoft Graph auth provider for Teams Framework
Constructors
Ms |
Constructor of MsGraphAuthProvider. |
Methods
get |
Get access token for Microsoft Graph API requests. |
Constructor Details
MsGraphAuthProvider(TokenCredential, string | string[])
Note
This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Constructor of MsGraphAuthProvider.
new MsGraphAuthProvider(credential: TokenCredential, scopes?: string | string[])
Parameters
- credential
- TokenCredential
Credential used to invoke Microsoft Graph APIs.
- 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.