I have a requirement to revoke all Azure access tokens assigned to a user when they leave the organization.
One way is to invoke this PowerShell command or call Graph API to achieve this.
PowerShell → Revoke-AzureADUserAllRefreshToken -ObjectId <object_id_of_user> Graph API → POST https://graph.microsoft.com/v1.0/users/<object_id_of_user>/revokeSignInSessions
Are there any other alternatives using Azure AD connector to achieve same result?
If the user is deactivated as part of leaver, I believe the access tokens will become useless. However. to explicitly revoke those, you may leverage after provisioning rule to call graph API to revoke access tokens. Direct connector can’t be used since access token is not a managed object.
Per Microsoft access tokens stay alive for up to 1 hour after user’s account is disabled. Only way (as of now) is to explicitly revoke them. This is especially critical for an Immediate termination use case.
I have also same requirement to revoke all Azure access tokens, Can you please attach Graph API code snippet, how we can use from After provisioning Rule.