SOLVED

Unable to -RemoveLicenses

Copper Contributor

 

It appears I am only able to remove licenses via Powershell that are not Assigned to Users/Groups or Inherited?

 

Set-MsolUserLicense -UserPrincipalName "user@contoso.com" -RemoveLicenses "contoso:STANDARDPACK"

 - I receive "Set-MsolUserLicense : Unknown error occurred."

 

 

However, when I remove something that does not have any Licensed Users or Groups Assigned in AAD, It works. Is this by design?

 

Set-MsolUserLicense -UserPrincipalName "user@contoso.com" -RemoveLicenses "contoso:POWERAPPS_VIRAL"

 

Chad

 

 

3 Replies

@cbuser935 

 Just to check ? Is your license still valid or has been cancelled?

Check the below information if it's true for your case 

license.PNG

best response confirmed by cbuser935 (Copper Contributor)
Solution

@cbuser935 

 

Yes, it's by design. If you assign license dynamically using Groups in AAD, you can not remove them with set-msoluser but you need to remove the user from the groups.

 

I hope it helps. 

 

@alextt 

Thank you for confirming this!!!

1 best response

Accepted Solutions
best response confirmed by cbuser935 (Copper Contributor)
Solution

@cbuser935 

 

Yes, it's by design. If you assign license dynamically using Groups in AAD, you can not remove them with set-msoluser but you need to remove the user from the groups.

 

I hope it helps. 

 

View solution in original post