You receive an error message when you try to add an Exchange license in Azure Active Directory (Azure AD) for Microsoft Office 365.
There are two Windows Azure Active Directory modules to administer Azure AD through PowerShell. Both are supported currently.
- MSOL - For more information about MSOL module, see the following articles:
- AzureAD - For more information about AzureAD module, see the following articles:
This issue can occur under different circumstances.
- If you receive an error message when assigning a new license, confirm that the object exists in the Azure AD by using the Azure AD PowerShell module. A UsageLocation parameter is required and has to be populated. For example:
Get-MsolUser -SearchString <userPrinicipalName or DisplayName> | fl UsageLocation
Get-AzureADUser -SearchString <userPrinicipalName or DisplayName> | fl UsageLocation
- To resolve this issue, try assigning the license through PowerShell. see Assign licenses to user accounts with Office 365 PowerShell. If that does not resolve the issue, collect the PowerShell log file that’s located here and open a case with Microsoft:
- If DirSync errors are present on an object, you may receive an error message when you try to change the license for the object, including adding or removing features. Check for DirSync errors by using the following support articles:
Identify directory synchronization errors in Office 365
Identifying DirSync provisioning errors in Office 365
For more information about how to troubleshoot, refer to the following articles:
Troubleshooting Errors during synchronization
Troubleshoot an object that is not synchronizing to Azure AD