user: revokeSignInSessions

Invalidates all the refresh tokens issued to applications for a user (as well as session cookies in a user's browser), by resetting the signInSessionsValidFromDateTime user property to the current date-time. Typically, this operation is performed (by the user or an administrator) if the user has a lost or stolen device. This operation prevents access to the organization's data through applications on the device by requiring the user to sign in again to all applications that they have previously consented to, independent of device.

If the application attempts to redeem a delegated access token for this user by using an invalidated refresh token, the application will get an error. If this happens, the application will need to acquire a new refresh token by making a request to the authorize endpoint, which will force the user to sign in.

Note

After calling revokeSignInSessions, there might be a small delay of a few minutes before tokens are revoked.

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) User.ReadWrite, Directory.ReadWrite.All, Directory.AccessAsUser.All
Delegated (personal Microsoft account) Not supported.
Application Directory.ReadWrite.All, Directory.AccessAsUser.All

HTTP request

POST /me/revokeSignInSessions
POST /users/{id | userPrincipalName}/revokeSignInSessions

Request headers

Header Value
Authorization Bearer {token}. Required.
Content-Type application/json

Request body

This operation has no request content.

Response

If successful, this method returns a 204 No Content response code.

Note

This API has a known issue. It returns a different HTTP response code.

Example

The following example shows how to call this API.

Request
POST https://graph.microsoft.com/v1.0/me/revokeSignInSessions
Response
HTTP/1.1 204 No Content