locked
OAUTH Tokens not working in POSTMAN RRS feed

  • Question

  • I have configured and API in API Management service with OAUTH2 enabled. token generation is working fine in the developer portal and it's validated successfully as part of the API call, all is working fine in the Developer Portal. However when I try to do the same in POSTMAN I get the error code below due to the token used seems to be not valid. 

        "statusCode": 401,
        "message": "Unauthorized. Access token is missing or invalid."

    I used the same values in POSTMAN than the ones I configured in the Azure API management service.

    IN BLUE

    Access Token URL: I have defined the tenant Id

    Client ID: App Client ID created in AAD

    Client Secreat App Client Secret Created in AAD

    Scope: Application ID of backend application.

    The token is generated correctly in POSTMAN however the validation is failing.


    Wednesday, September 19, 2018 12:42 AM

All replies

  • Azure API Management developer portal, by-default append the word “Bearer” as prefix to authorization header. You could be missing this word in POSTMAN. So, I would suggest you pass the token in POSTMAN with word “Bearer” as prefix and see if it makes any differences.

    ------------------------------------------------------------------------------------------------------If this answer was helpful, click “Mark as Answer” or Up-Vote. To provide additional feedback on your forum experience, click here
    • Proposed as answer by Swikruti Bose Wednesday, September 19, 2018 5:29 AM
    Wednesday, September 19, 2018 5:29 AM
  • @hmillon, Just checking in to see if the above suggestions helped or you need further assistance on this issue.

    Saturday, September 22, 2018 5:56 AM
  • @hmillon

    In Postman add token in Authorization section

    In postman click Authorization->type(Bearer Token) paste the token in Token section
    Now click on Header section you can see the token

    Copy the Token Generated in postman and paste in to the developer portal check working

    Tuesday, September 25, 2018 1:22 AM