question

BaroneLou-2451 avatar image
0 Votes"
BaroneLou-2451 asked BaroneLou-2451 commented

Filtering doesnt seem to work on a newer Intune\Ap graph endpoint.

I cannot seem to get filter\select to work.

can you tell me if they are supported on this endpoint?

What I am trying to do is query for a specific serial, or userprincipalname. As it stands today I have to get the initial 1k devices then page through for the rest, then do client side filtering to extract the machine I want. I would rather be able to filter api side and send over a specific serial or UPN to check to see if there is a corresponding device.

So for example something like this:

https://graph.microsoft.com/beta/xxx/deviceManagement/windowsAutopilotDeviceIdentities?$filter=serialNumber eq 82NAAA

I also tried with quotes:

https://graph.microsoft.com/beta/xxx/deviceManagement/windowsAutopilotDeviceIdentities?$filter=serialNumber eq '82NAAA'

also tried with an escape on the $ in filter which sometimes will mess up a web call:

https://graph.microsoft.com/beta/xxx/deviceManagement/windowsAutopilotDeviceIdentities?`$filter=serialNumber eq 82NAAA

All of the above fail with error 400 bad requests.

mem-intune-generalmem-autopilotmem-intune-graph
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

DaveRandall-5690 avatar image
0 Votes"
DaveRandall-5690 answered BaroneLou-2451 commented

Hey Lou... :)

$filter=contains(serialNumber,'011138765157')

is the right way to do this.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

My hero. This works. Thanks much Dave.

1 Vote 1 ·