Assign Office 365 Licenses automatically based on AD Attribute

This script assigns Office 365 licenses automatically based on a local AD attribute of your choice fully automated and minimal input. We also want a bit of logging so we are able to find and fix errors as easy as possible.

3.3 Star
6,816 times
Add to favorites
Office 365
E-mail Twitter Digg Facebook
  • Change Licenses
    1 Posts | Last post June 15, 2017
    • What would need to be done to this script to have the ability to switch SKU's on a user based on attribute?(i.e. Moving from E1 to E3, or E3 to E1) 
  • How would this work to assign specific service components of a license
    1 Posts | Last post April 25, 2017
    • Ex. an E3 license is composed of several components (ExchangeOnline,Skype,Sharepoint,ProPlus, etc) how can i modify this script to assign specific plans within the SKU?
  • script file location
    1 Posts | Last post January 18, 2017
    • Hi.
      In my case, I have local AD and office 365 works with Azure AD. There is one more.. ADSYNC. So I have 2 local PC(localAD, ADSYNC) that make AzureAD take data. I wonder where shoud this script be located. 
  • I just found your script and I have one question
    1 Posts | Last post July 27, 2016
    • I used your script and it worked perfectly the first time and added licenses to 6 people whose AD Attribute EmployeeType was set to e3.  When I went in for a second go round it wouldn't assign any licenses.  I gave me a report that 105 users don't have licenses but the next 2 I wanted assigned it said 0 licenses assigned.  
      Any ideas would be great.  Love the script.
  • License Assignment
    2 Posts | Last post November 27, 2014
    • Hi,
      I am not a PowerShell pro, but where exactly would you specify the license in the script?
      Because I am getting:
      Error: No licenses specified, please specify a supported license
      Info: Supported licenses are: K1,K2,E1,E3,A1S,A2S,A3S,A1F,A2F,A3F!
    • Hi,
      You assign them with the -Licenses parameter running the script.
  • How can i assign office365 and windows ad premium license at same time
    1 Posts | Last post July 23, 2014
    • How can i assign office365 and windows ad premium license at same time
  • Remove license based on AD attribute
    2 Posts | Last post April 03, 2014
    • Does anyone know of a script to do the opposite? Remove a license based on an AD attribute?
    • Hi,
      It could easily be implemented in my solution. Do you want it to just remove Everything on a specific user or more granular than that?