-
Notifications
You must be signed in to change notification settings - Fork 211
Description
Describe the bug
Revoked ATs are returned after re-login.
To Reproduce
-
Log in with auth code flow with
organizationstenant andhttps://management.core.windows.net/resource. -
Get an AT explicitly with tenant ID
54826b22-38d6-4fb2-bad9-b7b93a3e9c5a.At this point, in token cache the
AccessTokencontains 2 entries:- AT1:
14387eca3-bb26-4047-922a-6452cae1e9c7.54826b22-38d6-4fb2-bad9-b7b93a3e9c5a-login.microsoftonline.com-accesstoken-04b07795-8ddb-461a-bbee-02f9e1bf7b46-organizations-https://management.core.windows.net//user_impersonation https://management.core.windows.net//.default - AT2:
4387eca3-bb26-4047-922a-6452cae1e9c7.54826b22-38d6-4fb2-bad9-b7b93a3e9c5a-login.microsoftonline.com-accesstoken-04b07795-8ddb-461a-bbee-02f9e1bf7b46-54826b22-38d6-4fb2-bad9-b7b93a3e9c5a-https://management.core.windows.net//user_impersonation https://management.core.windows.net//.default
- AT1:
-
Revoke the session with
az rest -m POST -u https://graph.microsoft.com/v1.0/me/revokeSignInSessionsDoing so adds a new AT for
https://graph.microsoft.com/:- AT3:
4387eca3-bb26-4047-922a-6452cae1e9c7.54826b22-38d6-4fb2-bad9-b7b93a3e9c5a-login.microsoftonline.com-accesstoken-04b07795-8ddb-461a-bbee-02f9e1bf7b46-54826b22-38d6-4fb2-bad9-b7b93a3e9c5a-email openid profile https://graph.microsoft.com//auditlog.read.all https://graph.microsoft.com//directory.accessasuser.all https://graph.microsoft.com//group.readwrite.all https://graph.microsoft.com//user.readwrite.all https://graph.microsoft.com//.default
- AT3:
-
Re-login with auth code flow with
organizations.At this point, in token cache the
AccessTokencontains 3 entries and only AT1 is updated:- AT1 (Updated):
14387eca3-bb26-4047-922a-6452cae1e9c7.54826b22-38d6-4fb2-bad9-b7b93a3e9c5a-login.microsoftonline.com-accesstoken-04b07795-8ddb-461a-bbee-02f9e1bf7b46-organizations-https://management.core.windows.net//user_impersonation https://management.core.windows.net//.default - AT2 (Old):
4387eca3-bb26-4047-922a-6452cae1e9c7.54826b22-38d6-4fb2-bad9-b7b93a3e9c5a-login.microsoftonline.com-accesstoken-04b07795-8ddb-461a-bbee-02f9e1bf7b46-54826b22-38d6-4fb2-bad9-b7b93a3e9c5a-https://management.core.windows.net//user_impersonation https://management.core.windows.net//.default - AT3 (Old):
4387eca3-bb26-4047-922a-6452cae1e9c7.54826b22-38d6-4fb2-bad9-b7b93a3e9c5a-login.microsoftonline.com-accesstoken-04b07795-8ddb-461a-bbee-02f9e1bf7b46-54826b22-38d6-4fb2-bad9-b7b93a3e9c5a-email openid profile https://graph.microsoft.com//auditlog.read.all https://graph.microsoft.com//directory.accessasuser.all https://graph.microsoft.com//group.readwrite.all https://graph.microsoft.com//user.readwrite.all https://graph.microsoft.com//.default
- AT1 (Updated):
-
Get an AT explicitly with tenant ID
54826b22-38d6-4fb2-bad9-b7b93a3e9c5a-> the old revoked AT2 is returned -
Use AT2 with ARM -> ❌
Expected behavior
MSAL should purge all ATs if RT is updated for this user.
What you see instead
Old ATs are still preserved and returned by MSAL.
The MSAL Python version you are using
1.10.0
Additional context
To solve this issue I have to manually delete the MSAL cache to get all ATs purged.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status