Sunday, May 10, 2020

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:

https://developer.microsoft.com/en-us/graph/graph-explorer

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

Update the ‘VikasSukhija@labtest.com’  –> with UserPrincipalName for which you want to extract these properties.

https://graph.microsoft.com/v1.0/users?$filter=startswith(userPrincipalName,'Vikas.Sukhija@labtest.com')&$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

https://techwizard.cloud

https://www.syscloudpro.com/

PowerShell Cheat Book

No comments:

Post a Comment