Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New command: Revoke Sign-in Sessions #6514

Open
piniontech777 opened this issue Dec 6, 2024 · 4 comments
Open

New command: Revoke Sign-in Sessions #6514

piniontech777 opened this issue Dec 6, 2024 · 4 comments

Comments

@piniontech777
Copy link

piniontech777 commented Dec 6, 2024

Usage

m365 entra user session revoke [options]

Description

Revokes all sign-in sessions for a given user

Options

Option Description
-i, --id [id] The object ID of the user. Specify id or userName but not both.
-n, --userName [userName] User principal name of the user. Specify id or userName but not both.
-f, --force Don't prompt for confirmation

Examples

Revoke sign-in sessions of user with id 4fb72b9b-d0b0-4a35-8bc1-83f9a6488c48

m365 entra user session revoke --id 4fb72b9b-d0b0-4a35-8bc1-83f9a6488c48

Revoke sign-in sessions of user by name

m365 entra user session revoke --userName [email protected]

Revoke sign-in sessions of user by name without prompting for confirmation.

m365 entra user session revoke --userName [email protected] --force

Default properties

No response

Additional Info

https://learn.microsoft.com/en-us/graph/api/user-revokesigninsessions?view=graph-rest-1.0&tabs=http

@milanholemans
Copy link
Contributor

Hi, @piniontech777, thanks for the suggestion! I suggest that we change a few things to the spec:

  • Let's name the command entra user session revoke
  • Let's add a -f, --force option so users have to confirm this destructive action.

@piniontech777
Copy link
Author

piniontech777 commented Dec 9, 2024

Hi @milanholemans, I agree with your proposed modifications. The first idea ensures that the command syntax aligns with the existing user commands and the inclusion of the force flag makes sense in this case.

I have updated the original post. Thank you.

@milanholemans
Copy link
Contributor

Looks good to me! Do you want to work on it @piniontech777, or should we open it up?

@piniontech777
Copy link
Author

piniontech777 commented Dec 9, 2024

Great. This can be opened up for someone to work on. @milanholemans

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants