Ok, this blog post will be covering an API that doesn’t have any enhancements planned, but I’m hoping this may prove to be useful to others.
From Microsoft themselves:
We strongly recommend that you use Microsoft Graph instead of Azure AD Graph API to access Azure Active Directory resources. Our development efforts are now concentrated on Microsoft Graph and no further enhancements are planned for Azure AD Graph API. There are a very limited number of scenarios for which Azure AD Graph API might still be appropriate; for more information, see the Microsoft Graph or the Azure AD Graph blog post in the Office Dev Center.
First things first, our clients’ Environment contained Extension Properties that were on-premise. To get these available via Azure AD we had to run the Azure AD Connect Sync to sync Directory extensions made by Microsoft Exchange.
Now on to the code. The trick was to cast my IDirectoryObject to the proper class Microsoft.Azure.ActiveDirectory.GraphClient.User. This enabled me to call the “GetExtendedProperties” method.
This site was helpful as well https://www.simple-talk.com/cloud/security-and-compliance/azure-active-directory-part-6-schema-extensions/
From the code below I was able to extract the Key’s required by our application. And that, my friends, is that.