-
Notifications
You must be signed in to change notification settings - Fork 432
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
MSAL 1.32.0 Issue #1140
Comments
for me,Pining msal to 1.31.1 to solve the issue. |
I will look into this tomorrow |
No rush for me, I have pinned it within my app requirements. |
I know what's happening. In msal 1.32.0 they don't return expired access tokens when looking for them. AzureAD/microsoft-authentication-library-for-python@60144d5 So even when you have an access_token, if it's expired you no longer get it and it end up being deleted. Since I can no longer get the access token expire_on timestamp I can no longer tell if the refresh token is expired. This requires quite a large change in the way the library works and we can't certainly tell if refresh tokens are expired anymore, so the user will need to find out by just trying... |
Do you just assume that if there is no token that you should just try to renew and if that fails then request authorisation. I think you will understand what is possible far better than me. |
I'm changing the code so if a refresh token is present we will consider it's valid: |
Ok, I think that is fine. Let me know if you want me to test anything. I should be able to support you until the end of next week, then I have a week out. |
I suspect this change will probably solve the duplicate access token issue |
This will avoid errors with this unexpected change. Reported on #1140
I think I got it right. Tomorrow I will test the refresh token method and report back. @RogerSelwyn still hoping to look into the docs PR soon. |
I've still got something to do on Groups, I'll see if I can get that done today/tomorrow am. Then I think you should have everything unless you want any changes. If you want to talk about it at all, let me know. My email is my userid - hotmail.com |
Fixed and I have released version 2.1.1 on pypi |
I’ve tested this and it seems fine. |
I mentioned this issue in the JWT thread, but this is separate. Currently python-o365 requires msal>=1.13.1. Version 1.32.0 of msal was released on Wednesday, and some of my users (including myself) have been re-building containers as part of natural release cycles and this has pulled the newer release.
It seems with the newer release, the access token (not sure about refresh) is not getting updated when it expires. Or at least there is no update being done to the stored file system tokens. Pining msal to 1.13.1 seems to solve the issue.
I'm afraid debugging msal is beyond my reach at too layers down, especially since I have no real knowledge of how it works. Of course if there is anything I can do to help, you know I will.
I get this error in my logs if it is of use, of course the file system token still exists, but I can't tell about the cache.
The text was updated successfully, but these errors were encountered: