Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to incorporate the usage of AND when querying onPremisesExtensionAttributes/extensionAttribute in the MS Graph API?

I’m currently trying to query multiple values when it comes to onPremisesExtensionAttributes/extensionAttribute in MS Graph API.

I’m able to query this one:

https://graph.microsoft.com/beta/users?$count=true&$filter=onPremisesExtensionAttributes/extensionAttribute13 eq 'attr1'

But I want to query more values than attr1, but I haven’t managed to get it to work.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

I’ve tried queries, such as these two:

https://graph.microsoft.com/beta/users?$count=true&$filter=onPremisesExtensionAttributes/extensionAttribute13 eq 'attr1' and 'attr2' and 'attr3'

https://graph.microsoft.com/beta/users?$count=true&$filter=onPremisesExtensionAttributes/extensionAttribute13 eq 'attr1'&$onPremisesExtensionAttributes/extensionAttribute13 eq 'attr2'&$onPremisesExtensionAttributes/extensionAttribute13 eq 'attr3'

>Solution :

the correct syntax should be

$filter=onPremisesExtensionAttributes/extensionAttribute13 eq 'attr1' and onPremisesExtensionAttributes/extensionAttribute13 eq 'attr2' and onPremisesExtensionAttributes/extensionAttribute13 eq 'attr3'

one filter param to include all conditions, and each condition is full – field eq ‘value’

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading