Use the following script to Assign License in Office365
First connect to Office 365 via PowerShell
Get-MsolSubscription
This list the current license available in Office 365.
Set-MsolUser -UserPrincipalName username@office365domain.co.uk -UsageLocation UK
You first need to set the users to their local location in my case UK
Set-MsolUserLicense -UserPrincipalName username@office365domain.co.uk –AddLicenses “OFFICE365DOMAIN:O365_BUSINESS_ESSENTIALS”
This command assigns the licesnes you will need