Microsoft 365Troubleshooting

Group-based licensing errors in Microsoft 365: conflicts, usage location and fixes

Why group-based licence assignments fail for some members, where to see the errors, how to list affected users with Microsoft Graph PowerShell, and how to fix and reprocess them.

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.

Errors this guide fixes

  • CountViolationMicrosoft Graph (licenseAssignmentStates)
  • MutuallyExclusiveViolationMicrosoft Graph (licenseAssignmentStates)
  • DependencyViolationMicrosoft Graph (licenseAssignmentStates)
  • ProhibitedInUsageLocationViolationMicrosoft Graph (licenseAssignmentStates)
  • UniquenessViolationMicrosoft Graph (licenseAssignmentStates)
  • LicenseAssignmentAttributeConcurrencyExceptionMicrosoft Entra audit log
  • Conflicting service plansMicrosoft 365 admin center (Errors & issues)
  • Not enough licencesMicrosoft 365 admin center (Errors & issues)
How this guide is organised: Symptoms → Why it happens → How to fix it → Verify the fix → Prevent it next timeFlow diagram of the article's sections in reading order: 1. Symptoms. 2. Why it happens. 3. How to fix it (3 steps: Find the users in error; Fix the cause; Reprocess the affected users). 4. Verify the fix. 5. Prevent it next time. Toolbox: Get-MgGroupMemberWithLicenseError, Billing › Licenses, assignedByGroup, licenseAssignmentStates, ActiveWithError.1Symptoms2Why it happens3How to fix it4Verify the fix5Prevent it nexttime1Find the users in error2Fix the cause3Reprocess the affectedusersTOOLBOXGet-MgGroupMemberWithLicenseErrorBilling › LicensesassignedByGrouplicenseAssignmentStatesActiveWithErrorHow this guide is organised: Symptoms → Why it happens → How to fix it → Verify the fix → Prevent it next timeFlow diagram of the article's sections in reading order: 1. Symptoms. 2. Why it happens. 3. How to fix it (3 steps: Find the users in error; Fix the cause; Reprocess the affected users). 4. Verify the fix. 5. Prevent it next time. Toolbox: Get-MgGroupMemberWithLicenseError, Billing › Licenses, assignedByGroup, licenseAssignmentStates, ActiveWithError.1Symptoms2Why it happens3How to fix it1Find the users in error2Fix the cause3Reprocess the affected users4Verify the fix5Prevent it next timeTOOLBOXGet-MgGroupMemberWithLicenseErrorBilling › LicensesassignedByGrouplicenseAssignmentStatesActiveWithError
At a glance: how this guide is organised · 3 fix steps · 5 key tools

Symptoms#

  • 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.

Why it happens#

Group-based licensing is a Microsoft Entra ID feature that you now manage from the Microsoft 365 admin center. When you assign products to a group, the service evaluates every member separately and records the outcome in the user's licenseAssignmentStates collection: one entry per product, the source group in assignedByGroup, a state (Active, ActiveWithError, Disabled or Error) and an error value. The group assignment succeeds; individual members fail. These are the causes you'll meet:

ProblemGraph error valueTypical causeFix
Not enough licencesCountViolationThe group has more members than there are free units of the productBuy more units or free some up
Conflicting service plansMutuallyExclusiveViolationThe 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 dependenciesDependencyViolationA plan in another product needs a plan that this assignment removes or disablesKeep the required plan enabled, or remove the dependent add-on first
Usage locationProhibitedInUsageLocationViolationA service in the product isn't available in the user's usage locationCorrect the usage location, or disable that plan for those users
Proxy address conflictUniquenessViolationThe Exchange Online plan can't be provisioned because one of the user's addresses is already used by another objectRemove 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. You may also see LicenseAssignmentAttributeConcurrencyException in the Microsoft Entra audit logs when two groups assign the same product to one user at the same time; the service retries automatically and no action is needed.

How to fix it#

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:

PowerShell
Connect-MgGraph -Scopes "User.Read.All","Group.Read.All","Organization.Read.All"

# Readable product names
$sku = @{}
Get-MgSubscribedSku | ForEach-Object { $sku[$_.SkuId] = $_.SkuPartNumber }

# Groups with at least one member in error
Get-MgGroup -All -Filter "hasMembersWithLicenseErrors eq true" -Property Id,DisplayName |
    Select-Object DisplayName, Id

# Every assignment in error, with the group that caused it
Get-MgUser -All -Property Id,UserPrincipalName,UsageLocation,LicenseAssignmentStates |
    ForEach-Object {
        $u = $_
        $u.LicenseAssignmentStates |
            Where-Object { $_.Error -and $_.Error -ne 'None' } |
            ForEach-Object {
                [pscustomobject]@{
                    User          = $u.UserPrincipalName
                    UsageLocation = $u.UsageLocation
                    Product       = $sku[$_.SkuId]
                    State         = $_.State
                    Error         = $_.Error
                    ViaGroup      = $_.AssignedByGroup
                }
            }
    } | Format-Table -AutoSize

In a large tenant, enumerating every user takes a while; for a single group, Get-MgGroupMemberWithLicenseError -GroupId <id> -All returns only the members in error.

2. Fix the cause#

  1. 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 } }
  2. 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.
  3. Missing dependencies: re-enable the plan the other product relies on, or remove the dependent add-on before disabling the plan.
  4. 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"
  5. 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

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):

PowerShell
Connect-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 }

Processing time depends on tenant size and load, so give large groups some time before you check again.

Verify the fix#

PowerShell
(Get-MgUser -UserId "anna@contoso.com" -Property LicenseAssignmentStates).LicenseAssignmentStates |
    Select-Object SkuId, AssignedByGroup, State, Error
  • Good looks like State = Active, no error value (None), and AssignedByGroup showing your licensing group's object ID.
  • Errors & issues for the product is empty, and the hasMembersWithLicenseErrors query 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.
  • Watch free units and schedule the read-only report above, so you find errors before users do.

References#

Written and checked against current Microsoft Learn documentation. Test changes with a pilot group before rolling them out to everyone, and if an admin center path has moved since, search for the setting name instead.

Spotted a mistake, or did this fix work differently for you? Email me or message me on LinkedIn — corrections are credited in the article.

Written by

Omer Eltayeb

Intune Subject Matter Expert in Cairo, Egypt, former Microsoft Cloud Solutions Architect, Microsoft Certified Trainer and Microsoft Innovative Educator Expert (2024–26) and Microsoft Elevate Educator Expert (2026–27). I share practical, step-by-step guides, study plans, scripts and toolkits for Microsoft Intune, Configuration Manager, Microsoft Entra ID, Microsoft Defender, Exchange and Microsoft 365 with the community.

Microsoft Certified Trainer (MCT) 2026Microsoft Innovative Educator Expert 2025–2026Microsoft Elevate Educator Expert 2026–2027ISC2 Certified Information Systems Security Professional (CISSP)Microsoft 365 Certified: Enterprise Administrator Expert (MS-102)