Hi Kathryn Anderson,
Thanks for reaching out to Microsoft!
The error message you’re encountering with Set-MgUserLicense
indicates that the removeLicenses
parameter is missing from the request payload. When using this cmdlet, both -AddLicenses
and -RemoveLicenses
parameters need to be explicitly provided, even if one of them is empty.
If you don’t have any licenses to remove, please try including the -RemoveLicenses @()
parameter in your command and check if it resolves the issue.
You can refer to the relevant documentation for more details: Set-MgUserLicense
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.