Assigning Licenses in Office 365

Scenario description

For users to have full access to Office 365, they need an Office 365 license assigned. 

In this scenario we are adding a license.

Assigning Licenses in Office 365

To begin, you will need to connect to Azure Active Directory.
Import-Module MSOnline
$credential = Get-Credential
Connect-MsolService -Credential $credential

Before you can assign a license to a user, you must set the Usage Location for each user – represented by the two-character ISO code for that region.
The Usage Location specifies the country in which the service is to be used, and determines which licensed features are available for that region for example, US is for the United States of America.

Set-MsolUser -UserPrincipalName user@contoso.com -UsageLocation US
To view the list of available licenses, their SKU codes, and the quantity remaining for assignment, run the following command.
Get-MsolAccountSku

You can now use the Set-MsolUserLicense cmdlet with the -AddLicenses parameter to assign the license, using the appropriate AccountSkuId returned from the previous step.
You must replace user@contoso.com with the name of the actual user and replace contso with the name of your Office 365 tenant.You must replace user@contoso.com with the name of the actual user and replace contso with the name of your Office 365 tenant.

Set-MsolUserLicense -UserPrincipalName user@contoso.com -AddLicenses contoso:ENTERPRISEPACK
Resources
Assigning a license to a user

Explains how to use Windows PowerShell assign an Office 365 license to an unlicensed user.

Comments