2

I'm refining SPO API calls intended for a mobile app project using Postman, and all is fine except the access token keeps expiring after maybe a day.

How do I get the "refresh token" to work so I don't have to generate a new token each day?

I tried adding enable_auto_refresh_access_token = true in the token POST call, but I've no idea if that's what's required.

Update: Post call:

https://accounts.accesscontrol.windows.net/xxxxx/tokens/OAuth/2

The only header setting in the post is "content-type" application/x-www-form-urlencoded.

Header values in response:

enter image description here

2
  • HI Can you please show a screenshot of your post header parameters. And can you confirm you are getting a refresh token back. The idea is that you can store the refresh token in a variable for later re-use. – James Randal Jul 12 '20 at 7:48
  • @JamesRandal I updated the question. Not seeing a refresh token in the response. – matt Jul 13 '20 at 13:35
0

The above requests you're using should be client credentials flow

enter image description here

This flow won't expose a refresh token. By the way even if it offers a refresh token, you need to send request to refresh the access token each day as refresh token cannot be used to access the API directly, this won't save anything.

BR

1
  • That's why I'm asking - how do I get a refresh token? Msft documentation I've seen doesn't cover this. – matt Jul 14 '20 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.