This tool will help you update licensing settings for users in Office 365.

1. You will need to create a clientId and clientSecret which is a ServicePrincipal that will be able to edit your Azure Active Directory via the Graph API. Essentially this is a username password. Use the PowerShell script to create the in your Office 365 tenant.
Use the
Create-AzureADServicePrincipal.ps1 script to create the ServicePrincipal account.

2. Put the newly created clientId and clientSecret in the file localappsettings.config. You'll find places for these values.

3. Also add the Office 365 tenant name to the localappsettings.config file.

4. The program needs to run from the command prompt, so that you can see the output. Go ahead and run it with an empty input.txt file. This will validate that you have everything correct for the clientId, clientSecret, tenant and permissions. It will list out
all of the SKUs and ServicePlans which you will need to know when putting entries in the input.txt file.

5. Update the input.txt file to indicate what accounts need to have their licenses set. Note that setting the SKUs and ServicePlans here are additive. So you will only be adding new license, it does nothing to remove a license for a SKU or ServicePlan.

6. TEST! TEST! TEST! You don't want any kind of a disaster. So just put in a few test accounts to set their licenses and run it through and validate.

7. If all went well, fill out the rest of the input.txt file, you can set an account to the same licensing again, it won't give an error.

8. When you are doing a very big run, you will want to adjust the threadCount in the O365LicMgmt.exe.config file. It is set to 1 by default to allow for simple initial testing. But for the very big runs this is too slow. I have found that 12 seems to be a good
number, but you can do your own testing.

As it runs it will output some stats about how long the processing is taking and expected completion time.