title: Azure AD - Retrieve a On-Prem AD Group Common Name
body: <p>I have an application that needs to filter permissions based on their on-prem AD common name.  Couple of notes:</p>
  
  <ul>
  <li>Azure AD Connect is syncing data between OnPrem AD and Azure</li>
  <li>I am successfully retrieving the logged on user's group information from Azure Graph API into the Web Application.</li>
  </ul>
  
  <p>The problem I'm having is the data returned from Graph API is not what I need or I have not properly configured Azure AD Connect properly.  The Graph API JSON return object for groups is documented <a href="https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/groups-operations#GetAGroup" rel="nofollow">here</a>.</p>
  
  <p>Here is the Group object returned from Graph API:
  <div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>{
    "odata.metadata": "https://graph.windows.net/myorganization/$metadata#directoryObjects/Microsoft.DirectoryServices.Group/@Element",
    "odata.type": "Microsoft.DirectoryServices.Group",
    "objectType": "Group",
    "objectId": "b4bda672-1fba-4711-8fb1-5383c40b2c14",
    "deletionTimestamp": null,
    "description": "Marketing Department",
    "dirSyncEnabled": null,
    "displayName": "Marketing",
    "lastDirSyncTime": null,
    "mail": null,
    "mailNickname": "BposMailNickName",
    "mailEnabled": false,
    "onPremisesSecurityIdentifier": null,
    "provisioningErrors": [],
    "proxyAddresses": [],
    "securityEnabled": true
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>The closest thing I can find is "Display Name" but this is not the Common Name.  An option, one I don't want to use, is make all of the "Display Names" the same as the group CN.  </p>
  
  <p>TLDR;
  Is a user groups CN accessible through Graph API and if so, how can I get to this data?</p>
  
  <p>-Update: I'm using the Graph API endpoint getObjectsByObjectIds to hit Graph API once I have retrieve all of the Users Group Ids.  </p>