-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to renew microsoft access token after expiry #1440
Comments
Good find! Thank you. Would you mind opening a pull request with that? |
No problem - all done, let me know if you need me to do anything else/different |
Not sure if your code fixed the problem. Still got failed to refresh identity: microsoft: get user: get URL Get https://graph.microsoft.com/v1.0/me?$select=id,displayName,userPrincipalName: oauth2: token expired and refresh token is not set |
@RichardLindhout did you get a new refresh token? If so, what is the output from: |
This is the code I've changed: RichardLindhout@54d6934. Your command does not work, because we have a postgres database I guess. We have one accepted tenant and it works there. Maybe we should add the offline access in more places. Maybe multiple tenants are not allowed? I did not configure a tenant so everyone should be allowed to accept it. We're getting a Bad Session error. |
I guess there are other problems in the code then, as the fix works fine for us |
Strange then. Can't wrap my head around it. |
Same as before merging the pull request. |
@jimmythedog It's something else. I don't get a state parameter back from the admin consent. Thanks for your work btw ;) |
* 1440-fix-msoft-refresh-token: dexidp#1440 Add offline_access scope, if required
#1440 Add offline_access scope, if required
Without this scope, a refresh token will not be returned from Microsoft
When using the microsoft connector, the following error appears when trying to request a new token, after the access token has expired
connectorData.accessToken
expiry time in the persistedrefreshtoken
refreshToken
value in the k8s refreshtoken's connector datakubectl -n dex describe refreshtoken -o jsonpath="{.connectorData}" REFRESH_TOKEN_ID| base64 --decode
contains an empty refreshTokenscope
parameter the microsoft authorize request, only contains the user and directory scopes - not theoffline_access
scopeThe following patch has fixed the problem for us:
The text was updated successfully, but these errors were encountered: