Auto refresh Token is not working

My question:I am Using Oauth 2.0 for my project , where Access token gets expired every 19 mins , I have to go and click on Get New Access Token Every time . Refresh Token is not working . can anybody please guide me to refresh Token

Details (like screenshots):

1 Like

Do you have “Auto-refresh access token” toggled ON, like shown here?


I have turned it on , but still its not refreshing . Please help me on this .
I am using version 10.8.0

I’m having the same issue. This used to work until I updated Postman yesterday. Currently I’m on 10.10.5, not sure what version I was running before though

1 Like

I do not have the option of toggle Auto-Refresh Token button. It says refresh token is not present.

2 Likes

Hi amanjotsigh - we have exactly the same situation where the auto refresh token toggle button is greyed out.

Did you get any help / solution?

thanks

1 Like

Hi @aerospace-engineer-2 Did you find a solution for this? I am facing the same issue.

1 Like

Hi sorry, no solution so far. :frowning_face:

1 Like

The oAuth provider needs to return a refresh token as well as the access token. If you request a token with Postman, or if you use “Manage Access Tokens” you should see both the access and refresh tokens. If it just has the access token the oAuth provider isnt returning the refresh token. Once a refresh token has been acquired the “Auto-refresh token” option will be enabled.

When using Microsoft Azure as an oAuth2.0 provider you need to use offline_access in the scope. This will need to be configured in your app registration too.

For other providers the scopes will be different. Review their documentation or contact their support.

Same issue here. Recently upgraded to v10.12.8. Auto refresh enabled, but not working. Seems like the client_id is not passed in the request body.

hi @jetison We cannot get a refresh token to work either.

Doesn’t work for me either.
My provider doesn’t return a refresh token, I just hit the same URL again to get a new token.

I get why @Moodie007 says that the oAuth provider should provide a refresh token, but if they don’t, why can’t Postman just hit the same URL again for me?

It should refresh in the same way that it does when I click Get New Access Token.

Super annoying.

For Azure OAuth 2.0 client credentials flow, the Microsoft documentation states that

…refresh tokens will never be granted with this flow as client_id and client_secret (which would be required to obtain a refresh token) can be used to obtain an access token instead.

In this case the offline_access scope will not help and Postman should preferably just call the token endpoint to get a new access token instead.

All,
I discovered this after I realised our provider doesn’t provide an Access token. Is there any way to automate this request? Perhaps as a pre-request script?