user: invalidateAllRefreshTokens
Namespace: microsoft.graph
Important
APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
Invalidates all of the user's refresh tokens issued to applications (as well as session cookies in a user's browser), by resetting the refreshTokensValidFromDateTime 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 would prevent access to any of the organization's data accessed through applications on the device without the user first being required to sign in again. In fact, this operation would force the user to sign in again for all applications that they have previously consented to, independent of device.
For developers, 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.
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 |
| Delegated (personal Microsoft account) | Not supported. |
| Application | Not supported. |
HTTP request
POST /me/invalidateAllRefreshTokens
POST /users/{id | userPrincipalName}/invalidateAllRefreshTokens
Request headers
| Header | Value |
|---|---|
| Authorization | Bearer {token}. Required. |
Request body
This operation has no request content.
Response
If successful, this method returns 204 No Content response code.
Note
This API returns a different HTTP response code, similar to the revokeSignInSessions action. For details, see known issue.
Example
Request
The following is an example of the request.
POST https://graph.microsoft.com/beta/me/invalidateAllRefreshTokens
Response
The following is an example of the response.
HTTP/1.1 204 No Content
Feedback
Submit and view feedback for