Have a Question?
< All Topics
Print

Assign specific Office 365 license to users

Steps on how to assign specific Office 365 license to users with PowerShell

Get the AccountSKU & Individual Service Plan

Get the AccountSKU for the Office 365 E1 Subscription

Get-MsolAccountSku 

AccountSkuId                   ActiveUnits WarningUnits ConsumedUnits
------------                   ----------- ------------ -------------
XXXXXXXXXXXXXXXXX:STANDARDPACK 1500        0            1425         

List all the Service Plan available in the SKU

Get-MsolAccountSku | Select -ExpandProperty ServiceStatus

ServicePlan               ProvisioningStatus
-----------               ------------------
KAIZALA_O365_P2           Success           
MICROSOFT_SEARCH          Success           
WHITEBOARD_PLAN1          Success           
MYANALYTICS_P2            Success           
OFFICEMOBILE_SUBSCRIPTION Success           
BPOS_S_TODO_1             Success           
FORMS_PLAN_E1             Success           
STREAM_O365_E1            Success           
Deskless                  Success           
FLOW_O365_P1              Success           
POWERAPPS_O365_P1         Success           
TEAMS1                    Success           
SHAREPOINTWAC             Success           
PROJECTWORKMANAGEMENT     Success           
SWAY                      Success           
INTUNE_O365               PendingActivation 
YAMMER_ENTERPRISE         Success           
MCOSTANDARD               Success           
SHAREPOINTSTANDARD        Success           
EXCHANGE_S_STANDARD       Success       

Refer to the Product names and service plan identifiers for licensing for detail information on each Service Plan

Assign Specific Office 365 License to Users

Prepare a Customize License with Exchange Plan 1 $ Yammer disabled, and assign it to all users

Usage Location need to be configured first

$Users = Get-MsolUser -All
$SkuID = "XXXXXXXXXXXXXXXXX:STANDARDPACK"
$LicOption1 = New-MsolLicenseOptions -AccountSkuId $SkuID -DisabledPlans EXCHANGE_S_STANDARD, YAMMER_ENTERPRISE

#Set Usage Location to MY (Malaysia) to all users
foreach ($User in $Users) {
   Set-MsolUser -UserPrincipalName $User.UserPrincipalName -UsageLocation "MY" } 

#Assign License to all users
foreach ($User in $Users) {
    Set-MsolUserLicense -UserPrincipalName $User.UserPrincipalName -AddLicenses $SkuID -LicenseOptions $LicOption1 } 

Verify on the License assigned to Users

To verify that user called test1@xxx is assigned with O365 E1 License with Exchange Plan 1 disabled

(Get-MsolUser -UserPrincipalName test1@xxx).Licenses.serviceStatus

ServicePlan               ProvisioningStatus 
-----------               ------------------ 
KAIZALA_O365_P2           Success            
MICROSOFT_SEARCH          PendingProvisioning
WHITEBOARD_PLAN1          Success            
MYANALYTICS_P2            Success            
OFFICEMOBILE_SUBSCRIPTION Success            
BPOS_S_TODO_1             Success            
FORMS_PLAN_E1             Success            
STREAM_O365_E1            Success            
Deskless                  Success            
FLOW_O365_P1              Success            
POWERAPPS_O365_P1         Success            
TEAMS1                    Success            
SHAREPOINTWAC             Success            
PROJECTWORKMANAGEMENT     Success            
SWAY                      Success            
INTUNE_O365               PendingActivation  
YAMMER_ENTERPRISE         Disabled            
MCOSTANDARD               Success            
SHAREPOINTSTANDARD        Success            
EXCHANGE_S_STANDARD       Disabled 
Table of Contents
Scroll to Top