Preferred data location field stopped populating when new users are created

Michael Basso Work 21 Reputation points

We recently have been receiving calls that users Office 365 license is not available to them. While troubleshooting I learned that users that have recently been created (on-Premise) do not have the Preferred data location field set to United States in EntraID. In fact, it is blank. Apparently the Office 365 license can not be applied if that field is not populated. I checked the ADUC and the only field I can this of that syncs to the Preferred data location field is Country. Every user does not have that field populated. As a test I assign a random country (Aruba) to my account and synced to EntraID and my EntraID account still said United States. Where does the Preferred data location field get populated from and why did it suddenly stop populating?

thank you in advance

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,456 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
17,523 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Akhilesh 1,370 Reputation points Microsoft Vendor

    Hi @Michael Basso Work

    Thank you for reaching us!

    I understand that you are facing an issue with assigning licenses for new users, and you’ve found that the Preferred Data Location field is not being populated for these users.

    The Preferred Data Location (PDL) in Azure Active Directory is indeed used to specify the geographical location where a user’s Microsoft 365 data is stored. However, this does not impact license assignment. The issue could be related to the users’ usage location, which you can see in the screenshot provided.
    User's image

    If the Office 365 license is not available to the users who have been created on-premises, it could be due to the usage location attribute not syncing or set with Microsoft Entra ID. This is a mandatory property that needs to be assigned while assigning the license.

    This property can be set manually from the GUI in the users’ properties, as shown in the screenshot below.User's image

    You can also set this property using PowerShell with the following command.

    Set-MsolUser -UserPrincipalName “user@

    This command sets the usage location of a user. The country should be a two-letter ISO code.

    I understand that you are using AD Connect in your environment which means you syncing the objects from on-Premises to Entra ID (Azure AD) so you may have already populated following attributes for an on-premises user.

    • C = Country Code
    • CO = Country Name
    • Country Code = Numerical number of the code

    User's image

    Even though you have populated above attributes in on-prem AD for the users and AADConnect synchronize the accounts to Azure AD, Usage Location is not populated in Azure AD. The reason is that these attributes are not used by Azure AD to set Usage Location.

    By default, in Azure AD Connect “UsageLocation” in the Azure Active Directory is mapped to “msExchUsageLocation” on-premises. So, if you populate msExchUsageLocation with two letter ISO code for the users in on-premises, users will be assigned Usage Location. Values assigned in on-prem will be overwritten in Azure AD during the AADConnect sync.

    If you do not want to populate msExchUsageLocation as you already have attribute “C” is updated with two letter country code, then you may change flow rules of AAD Connect to map “C” to “UsageLocation”.

    The above attribute is exchange attribute, if you do not have the exchange in you on-Premise, install the exchange schema in your on-premise this will help you to create particular attribute and run the sync to populate attribute value.

    I hope this answer helps! If you have any further questions, please feel free to ask.



    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.