Prerequisites

  • Postman installation. Postman can be downloaded from https://www.postman.com/downloads/.
  • The following data source information:
    • Redirect URL - the endpoint to which the client is returned after authenticating with a third-party service
    • Authorization URI - the endpoint for obtaining an authorization code from the Azure authorization service
    • Token URI - the endpoint used to exchange authentication credentials for access tokens
    • Client ID - the client ID for your application
    • Client secret - the client secret for your application
    • Scope - an OAuth scope or a space-separated list of OAuth scopes
Note:

The following steps describe how to obtain a refresh token by issuing a Postman request to the Azure endpoint for your Dynamics 365 application.

  1. Open Postman.
  2. Click Authorization.
  3. Select OAuth 2.0 from the TYPE dropdown.
  4. Enter the following information on the Current Token panel.
    • Grant Type: Select Authorization Code.
    • Callback URL: Enter the redirect URI. For Postman, this value is http://localhost.
    • Auth URL: Enter the authorization URI.
    • Access Token URL: Enter the token URI.
    • Client ID: Enter the client ID.
    • Client Secret: Enter the client secret.
    • Scope: Enter scope.
  5. Obtain the refresh token.
    1. Click Get New Access Token.
    2. If logon popup appears, enter Azure Active Directory credentials. (This popup may not appear if you previously logged on.)
    3. If consent popup appears, provide consent, allowing the Postman to retrieve the tokens. (This popup may not appear if you previously provided consent.)
      Note: Access and refresh tokens are returned in the MANAGE ACCESS TOKENS window.
    4. Copy the refresh token to a secure location.