Get Extension Attributes Using Microsoft Graph

There can be situations where you as a DevOps  engineer or infrastructure administrator want to access extension attributes or other onpremise attribute values from the cloud without accessing these thru on-premise infrastructure.

One such situation I have been encountered with Microsoft flow where I want to get back-end properties when user fill the powerapps form.

I can not get these properties using existing flow connectors like Office 365 users or Azure AD.

Looking at this problem what comes immediate in my mind is to utilize Microsoft Graph which can be used with flow, powerapps , powershell or any other methods, we just need to know the uri that needs to be used for fetching that information.

Launch Graph explorer:

Here is the uri to get the onpremise attributes information (note: onPremisesExtensionAttributes)

Update the ‘’  –> with UserPrincipalName for which you want to extract these properties.$filter=startswith(userPrincipalName,'')&$select=id,displayname,mail,officeLocation,onPremisesExtensionAttributes

Now you know the graph uri for on-premise attributes and you have tested these with graph explorer.

You can now use these using powershell, flow, powerapps or any other method that you want.

Thanks for reading …..

Tech Wizard

PowerShell Fast Track


4 thoughts on “Get Extension Attributes Using Microsoft Graph

  1. Hi!, great tip. Thank you. In my case the result the query runs but gets no result on the onPremisesExtensionAttributes attribute. Could this be due to a api permission ? I have User.All granted. Which permissions did you use?

  2. Hello ,

    Thank you for your blog @Vasil Michev , its really good one and very helpful.

    Is their any other string : signInActivity , If I need to use my onPrim AD attribute lastlogon , lastlogondate , Is this possible ?

    Thanks in advance.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s