Preferred data location field stopped populating when new users are created

Strensnik Work 41 Reputation points
2023-11-06T17:13:34.9933333+00:00

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,919 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,151 questions
{count} votes

Accepted answer
  1. Akhilesh Vallamkonda 10,325 Reputation points Microsoft Vendor
    2023-11-09T11:53:15.1966667+00:00

    Hi @Strensnik 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.

    Reference: https://learn.microsoft.com/en-us/powershell/module/msonline/set-msoluser?view=azureadps-1.0#example-3-set-the-location-of-a-user

    https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/reference-connect-sync-attributes-synchronized

    Thanks,
    Akhilesh.

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


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.