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.
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-responseIn 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 theaccess_token
returned fromexchange_code
but that returned an Invalid Request exception.