Checklist
Group-based licensing troubleshooting checklist
Based on the article: Group-based licensing errors in Microsoft 365: conflicts, usage location and fixes · 5 min read
Group-based licensing is the cleanest way to license Microsoft 365, until a few members end up without a mailbox or Teams while the group itself looks healthy. Assignment errors are recorded per user, so they are easy to miss. In this post I'll cover the error types, where they show up, how to list every affected user with Microsoft Graph PowerShell, and how to fix and reprocess them.
Symptoms to confirm
- A user is a member of the licensing group, but has no mailbox, Teams tells them they need a licence, or Microsoft 365 Apps won't activate.
- In the Microsoft 365 admin center, Billing › Licenses › product › Errors & issues lists one or more users.
- Some members of a group received their licences and others didn't. When a group assigns several products and one of them can't be assigned to a user, that user doesn't get the other products from the group either.
Likely causes
Group-based licensing is a Microsoft Entra ID feature that you now manage from the Microsoft 365 admin center.
| Problem | Graph error value | Typical cause | Fix |
|---|---|---|---|
| Not enough licences | CountViolation | The group has more members than there are free units of the product | Buy more units or free some up |
| Conflicting service plans | MutuallyExclusiveViolation | The user already has a product, often assigned directly, with plans that can't run side by side with the group's plans (for example Office 365 E1 and E3 contain different levels of the same services) | Remove the other product, or turn off the conflicting plan in one of the assignments |
| Missing dependencies | DependencyViolation | A plan in another product needs a plan that this assignment removes or disables | Keep the required plan enabled, or remove the dependent add-on first |
| Usage location | ProhibitedInUsageLocationViolation | A service in the product isn't available in the user's usage location | Correct the usage location, or disable that plan for those users |
| Proxy address conflict | UniquenessViolation | The Exchange Online plan can't be provisioned because one of the user's addresses is already used by another object | Remove or change the duplicate address |
- A blank usage location doesn't cause an error: members licensed through a group inherit the tenant's location. That is convenient, but wrong for users in other countries, so set the value deliberately.
Checklist
- 1
Find the users in error
For one product, open Billing › Licenses, select the product, open Errors & issues and select a user to see the error type. For a tenant-wide, read-only list, use Microsoft Graph PowerShell:
See the full script in the source article.
- 2
Fix the cause
- Not enough licences: compare purchased and consumed units, then reclaim licences from leavers or from users who also hold a redundant direct assignment, or buy more.powershell
Get-MgSubscribedSku | Select-Object SkuPartNumber, ConsumedUnits, @{ n = 'Purchased'; e = { $_.PrepaidUnits.Enabled } } - Conflicting service plans: in the script output, look for another entry for the same user with an empty
ViaGroup(a direct assignment) or a different group. Remove that product, or edit one assignment to switch off the conflicting plans. Remember that changing plans on the group affects every member. - Missing dependencies: re-enable the plan the other product relies on, or remove the dependent add-on before disabling the plan.
- Usage location: set the correct two-letter country code. If your directory sync flows usage location from on-premises Active Directory, change it there instead, or the next sync cycle puts the old value back.powershell
Update-MgUser -UserId "anna@contoso.com" -UsageLocation "EG" - Proxy address conflict: find the object that already holds the address in Exchange Online PowerShell, then remove the address from whichever object shouldn't have it. For synced objects, fix it on-premises; see Entra Connect sync errors and duplicate attributes.powershell
Get-Recipient -Filter "EmailAddresses -eq 'anna@contoso.com'" | Format-List DisplayName, RecipientType, EmailAddresses
- Not enough licences: compare purchased and consumed units, then reclaim licences from leavers or from users who also hold a redundant direct assignment, or buy more.
- 3
Reprocess the affected users
Group-based licensing reacts to membership and assignment changes, but fixing a cause elsewhere, such as freeing up licences or removing a duplicate address, doesn't always trigger a new evaluation. Reprocess the users who are still in error (License Administrator or User Administrator role):
powershellConnect-MgGraph -Scopes "User.ReadWrite.All","Group.Read.All" $groupId = "<group object ID>" Get-MgGroupMemberWithLicenseError -GroupId $groupId -All | ForEach-Object { Invoke-MgLicenseUser -UserId $_.Id | Out-Null }
Verify
(Get-MgUser -UserId "anna@contoso.com" -Property LicenseAssignmentStates).LicenseAssignmentStates |
Select-Object SkuId, AssignedByGroup, State, Error- Good looks like
State=Active, no error value (None), andAssignedByGroupshowing your licensing group's object ID. - Errors & issues for the product is empty, and the
hasMembersWithLicenseErrorsquery no longer returns the group. - The services follow: the mailbox appears in Exchange Online, Teams signs in normally and Microsoft 365 Apps activate. Mailbox provisioning can lag slightly behind the licence.
Prevent it next time
- Set usage location at creation. Make it part of your provisioning flow, whether that is HR-driven provisioning, directory sync or a script.
- One licensing group per product and plan combination. Keep groups that assign conflicting products mutually exclusive; dynamic membership rules make this easier.
- Remove redundant direct assignments once users are covered by a group; Microsoft's PowerShell examples for group-based licensing include a pattern for it.
- Move users in the right order: add them to the destination group, confirm the new licence is active, then remove them from the old group. Removing first leaves them unlicensed until processing finishes.
- Avoid nested groups for licensing: only the group's direct user members receive the licences.
+1 more tips in the full article.