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: aad user license add #4504
Comments
Hi @milanholemans, looks great! |
Hi @martinlingstuyl, I've created a command for that as well #4503 |
We could also split it into two commands: user license add |
Ahh, I looked in the epic, it wasn't there. |
Yeah I didn't include it there because it's not really related to AAD users. |
So what about this @milanholemans? |
At first I thought the same. On the other hand I found it weird that we are splitting the functionality of 1 API endpoint over 2 commands. Why would I make 2 requests if I can do it into 1. |
I'm primarily thinking if its user friendly enough. Using add/remove would fit better with how we do things normally, instead of having these oddly named add and remove options. What do you think @pnp/cli-for-microsoft-365-maintainers? |
hmm good question. |
In that case I can follow you in that. |
@martinlingstuyl @Adam-it updated the specs, could you have another look? |
I'd say: let's make the option name singular, eg id. Just as with the options in this command where multiple values can be added.. @milanholemans |
Other than that it looks great 👏 |
Can I work on this? |
✅👍💪🚀🤩 |
Just wondering, would it be helpfull to add an extra option It would require an extra api call, but it would make the command more practical to use |
Usage
m365 aad user license add [options]
Description
Assigns subscriptions to a user
Options
--userId [userId]
userId
oruserName
but not both.--userName [userName]
userId
oruserName
but 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
usageLocation
value in order to assign a license to it.The text was updated successfully, but these errors were encountered: