GetOAuthAccessToken
Gets an authentication token from Outlook.
Input
Name | Type | Required | Description |
AuthMode | String | False | The type of authentication mode to use. Select App for getting authentication tokens via a desktop app. Select Web for getting authentication tokens via a Web app.
The allowed values are APP, WEB. The default value is APP. |
Scope | String | False | A space-separated list of permissions to request from the user. Please check the Microsoft Graph API for a list of available permissions. When OAuthGrantType='CLIENT', a scope of 'https://graph.microsoft.com/.default' is used. '/.default' picks up whatever permissions your app already has.
The default value is offline_access https://graph.microsoft.com/calendars.readwrite.Shared https://graph.microsoft.com/Contacts.ReadWrite https://graph.microsoft.com/Group.Read.All https://graph.microsoft.com/Group.ReadWrite.All https://graph.microsoft.com/User.ReadWrite.All https://graph.microsoft.com/Mail.ReadWrite.Shared. |
CallbackUrl | String | False | The URL the user will be redirected to after authorizing your application. This value must match the Redirect URL you have specified in the Outlook app settings. Only needed when the Authmode parameter is Web. |
Verifier | String | False | The verifier returned from Outlook after the user has authorized your app to have access to their data. This value will be returned as a parameter to the callback URL. |
State | String | False | Indicates any state which may be useful to your application upon receipt of the response. Your application receives the same value it sent, as this parameter makes a round-trip to the Outlook authorization server and back. Uses include redirecting the user to the correct resource in your site, nonces, and cross-site-request-forgery mitigations. |
Prompt | String | False | Defaults to 'select_account' which prompts the user to select account while authenticating. Set to 'None', for no prompt, 'login' to force user to enter their credentials or 'consent' to trigger the OAuth consent dialog after the user signs in, asking the user to grant permissions to the app. |
Result Set Columns
Name | Type | Description |
OAuthAccessToken | String | The access token used for communication with Outlook. |
OAuthRefreshToken | String | The OAuth refresh token. This is the same as the access token in the case of Outlook. |
ExpiresIn | String | The remaining lifetime on the access token. A -1 denotes that it will not expire. |