Auth0 Home Blog Docs

IDP's token not valid when we call api in postman

management-api

#1

I got access token which I am using to get IDP token. When I get IDP token and run in postman by adding it in a header and performing GET request to endpoint https://outlook.office.com/api/v2.0/me/contacts, it gives an error like below.

{“error”:{“code”:“InvalidMsaTicket”,“message”:“ErrorCode: ‘PP_E_RPS_REASON_TIMEWINDOW_EXPIRED’. Message: ‘’”,“innerError”:{“requestId”:“7804322f-969e-43c6-ae20-58741d57b18e”,“date”:“2018-12-06T15:25:10”}}}

any help?


#2

This probably means that the IdP Access Token is expired. Auth0 doesn’t ask for a refresh token when authenticating through the Microsoft Account strategy, so this IdP Access Token is basically useful for actions taken immediately after login (e.g. obtain some additional profile info from a rule) or shortly thereafter.

If your application core functionality depends on the IdP token to access an external API the suggestion would be to issue a separate request to get an access token (and refresh token if it makes sense) directly from the IdP.


#3

@nicolas_sabena
Thanks for your help.