Graph API RevokeSignInSessions not invalidating refresh tokens

Dongyang Li 0 Reputation points
2025-10-23T13:00:01.73+00:00

I am trying to use MS Graph RevokeSignInSessions to invalidate a user's refresh tokens to enforce the user to login when the existing access token expires.

I set the lifetime of access token to 5 mins. In my tests, when the request completes successfully, the pre-logged in user can still get new access token, which means RevokeSignInSessions failed to invalidate issued refresh token.

Developer technologies | .NET | Entity Framework Core

1 answer

Sort by: Most helpful
  1. Anonymous
    2025-10-27T10:29:07.47+00:00

    Thanks for reaching out! experiencing an issue where the RevokeSignInSessions function in Microsoft Graph isn't invalidating the refresh tokens as expected, leading to the user being able to obtain a new access token even after revocation.

    So rundown of how Revoke-MgUserSignInSession is supposed to work if it invalidates all refresh tokens issued to applications for a user by resetting the signInSessionsValidFromDateTime property to the current time. This should compel the user to sign in again across all applications they've previously consented to use.

    1.Ensure that the user executing the Revoke-MgUserSignInSession cmdlet has the necessary permissions to revoke the sessions.

    2.Confirm that the application fetching the new access token is indeed prompting for a refresh token and not using a cached access token.

    3.Make sure that there’s a proper delay between revocation and subsequent login attempts as the effects might not be immediate depending on how tokens are managed on the client-side.

    4.Double-check that your access token settings (like lifetimes) are not somehow configured to issue new tokens despite the revocation.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.