Need help with MgGraph API call
Jr Admin here learning the trade and I’ve been working on a project that has taken me from PowerShell to PHP to MgGraph and now MgGraph API calls.
I’m trying to filter incoming information from Entra by using a MgGraph API filter in PHP based on one attribute in our accounts. The thing is, I’m trying to filter based on extensionAttribute14. I’ve been working in the MS MgGraph lab and I’ve got this request that returns my account along with my extension attributes:
https://graph.microsoft.com/v1.0/users/<UPN>?$select=id,displayName,onPremisesExtensionAttributes
This runs perfectly, I get my id, displayName and all 15 extensionAttributes. Thing is, I only care about extensionAttribute14.
All of the sites that I’ve found information on show how to pull all of the attributes but not individual ones.
I’ve tried using syntax similar to PowerShell (onPremisesExtensionAttributes.extensionAttribute14) but this just prevents any of the attributes from showing at all.
What would be the syntax to return just one extensionAttribute and how can I search based on non-null values of that attribute?