Fix it now
Entra ID will not licence a user until it knows which country that user is in. Microsoft documents that an administrator must specify the Usage location property before a licence can be assigned. ProhibitedInUsageLocationViolation is the usage location category; UniquenessViolation is the separate proxy address one.
Connect-MgGraph -Scopes User.ReadWrite.All
Update-MgUser -UserId user@contoso.com -UsageLocation GB
- Set the value to the country where the person actually works, not one that makes the error go away. In the Microsoft 365 admin center it is under Users, Active users, the user, Account.
- Retry the assignment. Where the licence comes from a group, reprocess the group afterwards rather than waiting for it to notice.
- If the location is set and the failure persists, the specific service plan is not offered in that country. Disable that plan for those users rather than changing the country.
- If the failure is UniquenessViolation, find the other object holding the address before you change anything on this one – active users, contacts, groups, and deleted objects all count.
- Confirm the result on the user’s Licenses and apps page, which should list the product with no error beside it.
Group licence assignment never modifies an existing usage location value on a user, so a wrong value set once will keep producing the same failure until somebody corrects it at source.
If the licence applies, stop here. If the value keeps reverting, or you cannot find what holds the duplicate address, the next section covers both.
Why it happens
Usage location records the country in which a user consumes the service. It is not a data residency setting and it does not move anybody’s mailbox. It exists because some services cannot lawfully be provided in some countries, and because entitlements are recorded against a place. Microsoft’s guidance is explicit that the property must be specified before a licence can be assigned, and that users without one inherit the location of the directory.
That makes the temptation obvious and the answer clear. Setting the value to a country the user is not in will clear the error and will misrepresent where your organisation is using the service. Set it to where the person actually works. If a service genuinely is not available there, disable that plan for those users and record why – which is also why Microsoft’s guidance is to set usage location at user creation, so the result of licence assignment is always correct and users do not receive services in locations that are not allowed.
UniquenessViolation has nothing to do with geography. It is the published value behind the proxy address category: addresses have to be unique across the tenant, so if another object already carries the address this user needs, the assignment fails. The other holder can be an active user, a contact, a group, or an object sitting in the recycle bin where nobody thinks to look.
Usage location is blank
You have this one if The user’s Account page shows no usage location, and every newly created account fails until somebody edits it.
- Set the value in the admin centre for one user, or with
Update-MgUserfor many. - Add it to whatever creates your accounts, so new starters arrive with it already populated.
- Reprocess the group licence assignment, or reassign directly, once the value is in place.
The value is a two-letter country code. Setting it does not move data or change where the service runs.
The service is not available in that country
You have this one if The usage location is correct, and the failure names a specific service plan rather than the whole product.
- Identify the plan named in the failure rather than assuming the whole product is refused.
- Disable that plan for the affected users and leave the rest of the product enabled.
- Check whether another product offers equivalent capability there before telling the users nothing can be done.
The value is overwritten at every synchronisation
You have this one if You set it, licensing works, and some hours later it is blank or wrong again.
- Check whether your directory synchronisation rules populate usage location from an on-premises attribute.
- If they do, set the value at source in Active Directory so it flows in the right direction.
- Confirm after the next synchronisation cycle that the value has stayed put.
Group licence assignment will not overwrite an existing usage location, so a value arriving from synchronisation always wins over one typed into the portal.
Another object already holds the address
You have this one if UniquenessViolation, with the failure naming an address rather than a country.
- Find the other holder. Searching recipients in Exchange Online locates mail-enabled objects the user list alone will not show.
- Decide which object should keep the address and remove it from the other.
- Allow the change to take effect, then retry the assignment.
A deleted object is still holding the address
You have this one if Nothing visible holds the address and the conflict persists anyway.
- Check deleted users in the admin centre, and look for soft-deleted mail objects as well.
- Restore and correct the object, or delete it permanently to release the address.
- Retry the assignment once the address is genuinely free.
Permanently deleting an object cannot be undone. Confirm it is genuinely obsolete first.
Full reference
Which refusal are you dealing with
| Symptom | Where the problem is |
|---|---|
| Every newly created account fails until someone edits it | Nothing sets a usage location at creation |
| Only users in one country fail | That service plan is not offered there |
| The value you set reverts after a while | The attribute is being written from on-premises |
| The failure names a duplicate address | Another directory object holds it |
| A guest account cannot be licensed | Guests are user objects and need a usage location too |
| Nothing visible holds the address | A soft-deleted object still owns it |
Setting it once rather than repeatedly
This error recurs in almost exactly the same way in every tenant that has it, because the fix is applied to users rather than to the process that creates them. The durable answer is to populate usage location wherever accounts are born: the provisioning script, the automated provisioning connection from your personnel system, the on-premises attribute your synchronisation reads, or the template your administrators use. Microsoft’s own recommendation is to set it during user creation so the result of licence assignment is always correct.
What usage location is not
- It is not data residency. Where content is stored is decided separately, by the tenant and the services you use.
- It is not a mailbox move. Changing it moves nothing.
- It is not inherited from the manager, the group or the office attribute. Users without one inherit the directory’s location, and that is the only inheritance there is.
- It is not something group licensing will fix for you: group assignment never modifies an existing usage location value on a user.
Hunting a duplicate address
- Search the directory for the address across users, groups and contacts, not just active users.
- Search recipients in Exchange Online, which surfaces mail-enabled objects the user list does not.
- Check deleted users, and soft-deleted mail objects, which hold their addresses until they are purged.
- Decide which object keeps the address; do not simply remove it from whichever one is easier to edit.
- Retry the assignment only after the change has propagated, or you will diagnose the same error twice.
Guests and service accounts
Guest accounts are user objects and the same rule applies to them, which surprises people the first time they try to licence an external collaborator. Service accounts are the same. Neither is an exception, and neither will pick up a usage location from anywhere on its own – so if your provisioning covers staff accounts only, these are the objects that will keep producing the error long after the staff problem is fixed.
Every code this article covers
| Code | What it points at | Source |
|---|---|---|
ProhibitedInUsageLocationViolation |
A published licence assignment failure value, corresponding to the usage location category: the service cannot be assigned for the country the user’s usage location names, or no usage location is set | Microsoft Learn |
UniquenessViolation |
A published licence assignment failure value, corresponding to the proxy address category: another directory object already holds an address this assignment requires | Microsoft Learn |
License cannot be assigned to a user without a usage location specified |
The plain-language form of the same refusal. Microsoft documents the rule – the Usage location property must be specified before a licence can be assigned – but does not publish this literal string | not published by the vendor |
Duplicate proxy addresses |
The plain-language form of the uniqueness refusal. Microsoft names proxy address issues as an assignment error category and documents duplicate proxyAddresses on the synchronisation side, but does not publish this literal string | not published by the vendor |
Confirm the fix worked
- The user’s Account page shows the expected usage location.
- The licence appears on the user’s Licenses and apps page with no error beside it.
- The product’s Errors & issues tab shows no remaining assignment failures for that group.
- The address that caused the uniqueness conflict now exists on exactly one object.
- A newly created test account arrives with a usage location already set, proving the process was fixed and not just the user.
Questions people ask about this
Does this cost anything to fix?
No. Usage location is an attribute on a user object, not an entitlement. Setting it is free and no plan or add-on changes how it behaves.
Can I set a default for the whole tenant?
Users without a usage location inherit the directory’s location, but the reliable answer is to set it wherever accounts are created – the provisioning script, the automated provisioning connection, or the on-premises attribute your sync reads. Relying on somebody remembering is how this recurs.
Does changing usage location move my data?
No. Where your data is stored is decided separately, when the tenant is created and by the services you use. Usage location governs which services may be assigned to that person.
Do guest users need one?
If you want to assign them a licence, yes. Guests are user objects and the same rule applies, which catches people out the first time they try to licence an external collaborator.
The value I set keeps disappearing. Why?
Because something is writing it from on-premises. Group licence assignment never modifies an existing usage location, so a synchronised value always wins. Fix it at source in Active Directory.
