Thursday, 9 May 2013

Use PowerShell to assign specific service plan licenses to Office 365 users

You can use PowerShell to create users in Office 365 and assign licenses to them.
In order to do it you will first need to see what your Account SKU IDs are by running the following command:


This will give you a list of your available SKUs in the following format:

mydomain:SKU (Example: mydomain:ENTERPRISEPACK)

Now you can use the retrieved "AccountSkuID" to assign licenses to users. Below is an example of creating a new user and assigning E3 (ENTERPRISEPACK) license:

New-MsolUser -UserPrincipalName "" -DisplayName "Amin Test1" -FirstName "Amin" -LastName "Test1" -UsageLocation "GB" -LicenseAssignment "mydomain:ENTERPRISEPACK"

You may want to assign specific licenses within a SKU rather than assigning the whole E3 license. In that case you need to create your own license assignment option. To do that we first need to see what the service plan IDs are for each individual service within the E3 SKU. 

Run the following commands to get a list of service plan IDs:

$s = Get-MsolAccountSku | Where {$_.SkuPartNumber -eq "ENTERPRISEPACK"}

As you can see, the following are the individual service plans in E3 pack:
RMS_S_ENTERPRISE                 (Windows Azure Active Directory Rights - this is new in Wave 15)
OFFICESUBSCRIPTION              (Office Professional Plus)
MCOSTANDARD                         (Lync Online)
SHAREPOINTWAC                      (Office Web Apps)  
SHAREPOINTENTERPRISE          (SharePoint Online)
EXCHANGE_S_ENTERPRISE        (Exchange Online)

Now we create our own custom plan to assign an individual service plan license to a user. In this example we are assigning SharePoint Online license:


As you can see we still set the AccountSkuId to "mydomain:ENTERPRISEPACK", however using the DisabledPlans switch we are disabling all the other service plans, leaving SharePoint Online only.

Now that we have created our own license assignment option, we can re-run the New-MsolUser command and add our own license option to it:

New-MsolUser -UserPrincipalName "" -DisplayName "Amin Test1" -FirstName "Amin" -LastName "Test1" -UsageLocation "GB" -LicenseAssignment "mydomain:ENTERPRISEPACK" -LicenseOptions $MyLicenseAssignmentOption

On the portal we can check the license assignment status of the new user that we just created and we can see only SharePoint Online license is assigned to the user:



  1. This comment has been removed by the author.

  2. This comment has been removed by the author.

  3. Great explanation! It's helpful to someone trying to figure this out.
    If you want to change an already licensed user's license options, to add Exchange as a license options as well as retaining their existing Sharepoint, you can do something like this:

    $MyOtherLicenseAssignmentOption = New-MsolLicenseOptions -AccountSkuId "mydomain:ENTERPRISEPACK" -DisabledPlans RMS_S_ENTERPRISE, OFFICESUBSCRIPTION, MCOSTANDARD, SHAREPOINTWAC

    get-msoluser -UserPrincipalName | Set-MsolUserLicense -LicenseOptions $MyOtherLicenseAssignmentOption

  4. Great Amin jan
    thank you very much

  5. This post was quite awesome and interesting to read. Congrats for your work. Thanks a lot for providing this with us. Keep on updating this with us regularly. microsoft excel malaysia

  6. I love to read and appreciate your work.
    office desk

  7. This is such a great resource that you are providing and give it away for free. I love seeing blog that understand the value of providing a quality resource for free.
    assignment writing service

  8. These desires may fluctuate between organizations, however bosses ought to for the most part be worried about standards against direct that may result in unlawful inappropriate behavior or other obligation, rules precluding revelation of secret or restrictive data, and friends strategies administering the utilization of corporate logos and other marking concerns when occupied with web based life utilize. social media networking

  9. I wanted to thank you for this excellent read!! I definitely loved every little bit of it. I have you bookmarked your site to check out the new stuff you post.

  10. When you call a garbage service, a group of solid specialists will turn up and be prepared to work for you. You reveal to them what necessities to go and they start expelling it for you, it's as simple as that. The garbage will be out of your life for good and you don't have to do any truly difficult work! london removal companies

  11. In fact, if you work primarily on your computer, you will need a model with a countertop which is no bigger than twice the width of your monitor or laptop. divisorias corporativas