Hi,
I am trying to assign a M365 Business Premium licence via PS using "Set-MsolUserLicense -UserPrincipalName <userPN> -AddLicenses reseller-account:o365_business_premium" however it is failing saying the licence is invalid. I have added the -TenantID parameter also to no avail.
I have used the Get-MsolAccountSku and this is the SKU that is returned. I have tried using just "o365_business_premium" and also prepended our M365 domain instead of "reseller-account", however it still reports as being 'invalid'.
Error:
Set-MsolUserLicense : Unable to assign this license because it is invalid. Use the Get-MsolAccountSku cmdlet to
retrieve a list of valid licenses.
At line:1 char:1
+ Set-MsolUserLicense -UserPrincipalName <userPN> ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [Set-MsolUserLicense], MicrosoftOnlineException
+ FullyQualifiedErrorId : Microsoft.Online.Administration.Automation.InvalidUserLicenseException,Microsoft.Online.
Administration.Automation.SetUserLicense
Anyone have any idea why this is not working?
Cheers!
Dave