GearPlug / microsoftgraph-python

Microsoft Graph API wrapper written in Python
MIT License
96 stars 40 forks source link

No refresh_token in exchange_code response. #13

Closed chrissyast closed 3 years ago

chrissyast commented 3 years ago

I've used exchange_token_result = client.exchange_code(REDIRECT_URL, code) to successfully exchange a code for a token, but there is no refresh_token in the response, which I anticipated from https://docs.microsoft.com/en-us/graph/auth-v2-user?context=graph%2Fapi%2Fbeta&view=graph-rest-beta#token-response

In the docs of this repo it is possible to call token = client.refresh_token(redirect_uri, refresh_token), but I don't know how I would obtain the refresh token to begin with. I tried using the access_token returned from exchange_code but that returned an Invalid Request exception.

chrissyast commented 3 years ago

Sorry, have done the same through an http request and got the same result, so it is not an issue with this repo