title: Finding and Displaying Extension Properties in MS Graph
body: <p>This AAD powershell easily lists out the extension Properties for a user:</p>
  
  <pre><code>PS C:\WINDOWS\system32&gt; Get-AzureADUser -ObjectId 50413382@wingtiptoys.com |select -ExpandProperty ExtensionProperty
  
  Key                                                             Value
  ---                                                             -----
  odata.metadata                                                  https://graph.windows.net/d29b7a9b-6edb-4720-99a8-3c5c6c3eeeb0/$metadata#directoryObjects/@Element
  odata.type                                                      Microsoft.DirectoryServices.User
  createdDateTime
  employeeId                                                      50413382
  onPremisesDistinguishedName
  thumbnailPhoto@odata.mediaEditLink                              directoryObjects/8cc715a1-0698-4d1a-8f49-441a84b6dbc4/Microsoft.DirectoryServices.User/thumbnailPhoto
  thumbnailPhoto@odata.mediaContentType                           image/Jpeg
  userIdentities                                                  []
  extension_10a03227b5f146ad8a0087cf0bafd627_division             |30103611|50435526|50230396|10192257|86009851
  extension_10a03227b5f146ad8a0087cf0bafd627_company              wingtiptoys Inc.
  extension_10a03227b5f146ad8a0087cf0bafd627_extensionAttribute10 GF
  extension_10a03227b5f146ad8a0087cf0bafd627_employeeID           50413382
  extension_10a03227b5f146ad8a0087cf0bafd627_cn                   50413382
  extension_10a03227b5f146ad8a0087cf0bafd627_extensionAttribute8  wingtiptoys Inc. Inc.
  extension_10a03227b5f146ad8a0087cf0bafd627_extensionAttribute7  Chuck
  extension_10a03227b5f146ad8a0087cf0bafd627_extensionAttribute6  US11
  extension_10a03227b5f146ad8a0087cf0bafd627_extensionAttribute5  US1-Rochester, NY- Site
  extension_10a03227b5f146ad8a0087cf0bafd627_extensionAttribute4  USC
  extension_10a03227b5f146ad8a0087cf0bafd627_extensionAttribute2  Regular
  extension_10a03227b5f146ad8a0087cf0bafd627_employeeType         ARR
  </code></pre>
  
  <p>I now have a request to build this sort of display into an authenticated web page, with a prior page that someone can type in that Object ID and see that output on the screen using the Microsoft Graph Client SDK.</p>
  
  <p>The key issue is that I can't hardcode the list of Extension Properties. I need to just list what is on that particular user.</p>
  
  <p>I've found how to get the value of an extension attribute once you know it's name, but how do you get the list of attributes above without knowing the attribute names ahead of time? (the <code>-ExpandProperty ExtensionProperty</code> part of the PowerShell)</p>
  
  <p>I've tried to get at this data via graph explorer, and am having difficulty. I've tried:</p>
  
  <ul>
  <li><code>/v1.0/me/?$select=id&amp;$expand=extensions</code>  (returns an empty extensions element)</li>
  <li><code>/v1.0/me/?$select=onPremisesExtensionAttributes</code> (returns some of the properties (but not all))</li>
  </ul>