GetOAuthAccessToken
Fetches the OAuth Access Token, which is used to authenticate and authorize API calls made to Azure Active Directory.
Input
Name | Type | Description |
AuthMode | String | Specifies the type of authentication mode to use when obtaining an OAuth token. Options include 'App' for desktop applications and 'Web' for web applications.
The allowed values are APP, WEB. The default value is APP. |
CallbackUrl | String | The URL to which the user will be redirected after authorizing your application. This must exactly match the Reply URL configured in the Azure Active Directory application settings. |
Verifier | String | The code verifier provided by Azure AD after user authorization. This value is sent as a query parameter to the callback URL. |
Scope | String | Defines the permissions to request during authentication. For 'OAuthGrantType=CODE', provide a space-separated list of desired scopes. For 'OAuthGrantType=CLIENT', the default scope is 'https://graph.microsoft.com/.default', which uses the permissions already assigned to your application.
The default value is offline_access https://graph.microsoft.com/.default. |
State | String | An optional string to help identify the origin of the request. This value is returned after the authentication roundtrip and helps verify the integrity of the request. |
Prompt | String | Determines how the user is prompted during authentication. Options include 'select_account' (default), 'none' (no prompt), 'login' (force login), and 'consent' (ask the user to grant permissions). |
Result Set Columns
Name | Type | Description |
OAuthAccessToken | String | The OAuth Access Token used to authenticate API requests with Azure Active Directory. |
ExpiresIn | String | Indicates the remaining lifetime of the access token in seconds. A value of -1 means the token does not expire. |
OAuthRefreshToken | String | The OAuth Refresh Token used to obtain a new access token when the current one expires. |