Usage
m365 aad user license add [options]
Description
Assigns subscriptions to 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 add. |
Examples
Assign specific licenses to a specific user by UPN
m365 user license add --userName "[email protected]" --ids "45715bb8-13f9-4bf6-927f-ef96c102d394,bea13e0c-3828-4daa-a392-28af7ff61a0f"
Assign specific licenses from a specific user by ID
m365 user license add --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
Docs
important: The user must have a usageLocation value in order to assign a license to it.
Usage
m365 aad user license add [options]
Description
Assigns subscriptions to a user
Options
--userId [userId]userIdoruserNamebut not both.--userName [userName]userIdoruserNamebut not both.--ids <ids>Examples
Assign specific licenses to a specific user by UPN
Assign specific licenses from a specific user by ID
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
Docs
important: The user must have a
usageLocationvalue in order to assign a license to it.