The Problem

Azure AD Connect Sync Tool is often used to sync on prem Active Directory users and their attributes to Azure Active Directory. To query for these user and other directory objects, the Graph REST endpoint (Azure AD Graph or Microsoft Graph) can be used. An example Microsoft Graph query to get a User is the following:

https://graph.microsoft.com/beta/users/john@contoso.com

In certain scenario, some attributes, whether they are synced as Directory Extension or as regular attribute, may not show up in the Graph query because they are multi-valued (MV). This is loosely documented here

An example multi-valued attribute is the departmentNumber attribute. To see if an attribute is an MV attribute, you can use the Active Directory Schema MMC Snap-In

 

So how can I query for this…

If you have Exchange installed in your environment, most likely your Active Directory Schema has been extended to include 15 User ExtensionAttributes (ExtensionAttribute1 – 15). You can just copy this value into one of the ExtensionAttributes and re-sync them to Azure AD. These will show up under the onPremisesExtensionAttributes collection for the User object.

Leave a Reply

avatar
  Subscribe  
Notify of