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
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?
try beta version of API, I have seen some people faced issue and beta worked for them.
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.
Nimit
Hi Nimit,
I do not think so that onpremise properties are available but you can use exchange online shell to get these properties for o365.