entra user session revoke
Revokes all sign-in sessions for a given user
Usage
m365 entra user session revoke [options]
Options
-i, --userId [userId]
The id of the user. Specify either
userId
oruserName
, but not both.-n, --userName [userName]
The user principal name of the user. Specify either
userId
oruserName
, but not both.-f, --force
Don't prompt for confirmation.
-h, --help [help]
Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options
,examples
,remarks
,response
,full
. Default isoptions
.--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]
Output type.
json
,text
,csv
,md
,none
. Defaultjson
.--verbose
Runs command with verbose logging.
--debug
Runs command with debug logging.
Remarks
To use this command you must be either User Administrator or Global Administrator.
There might be a small delay of a few minutes before tokens are revoked.
This API doesn't revoke sign-in sessions for external users, because external users sign in through their home tenant.
Examples
Revoke sign-in sessions of a user specified by id
m365 entra user session revoke --userId 4fb72b9b-d0b0-4a35-8bc1-83f9a6488c48
Revoke sign-in sessions of a user specified by its UPN
m365 entra user session revoke --userName john.doe@contoso.onmicrosoft.com
Revoke sign-in sessions of a user specified by its UPN without prompting for confirmation
m365 entra user session revoke --userName john.doe@contoso.onmicrosoft.com --force
Response
The command won't return a response on success.