Skip to content

New command: aad user license remove #4510

@milanholemans

Description

@milanholemans

Usage

m365 aad user license remove [options]

Description

Removes a license from a user

Options

Option Description
--userId [userId] The ID of the user. Specify either userId or userName but not both.
--userName [userName] User principal name of the user. Specify either userId or userName but not both.
--ids <ids> A comma separated list of IDs that specify the licenses to remove.
--confirm Don't prompt for confirmation.

Examples

Remove specific licenses from a specific user by UPN

m365 user license remove --userName "[email protected]" --ids "45715bb8-13f9-4bf6-927f-ef96c102d394,bea13e0c-3828-4daa-a392-28af7ff61a0f"

Remove specific licenses from a specific user by ID

m365 user license remove --userId 5c241023-2ba5-4ea8-a516-a2481a3e6c51 --ids "45715bb8-13f9-4bf6-927f-ef96c102d394,bea13e0c-3828-4daa-a392-28af7ff61a0f"

Default properties

No response

Additional Info

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions