Filter is not working for microsoft intune integration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2025 05:15 AM
Hi
I want to fetch data where userPrincipalName is not be empty. apart from this condition rest filter are working fine.
Could you please provide me right filter??
URL: /deviceManagement/managedDevices?$filter=(operatingSystem eq 'android' or operatingSystem eq 'iOS' or operatingSystem eq 'iPadOS') and managedDeviceOwnerType eq 'company' and userPrincipalName ne ''
Thank You!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2025 05:27 AM
@Chandra18 Can you try this way see if it helps you.
/deviceManagement/managedDevices?$filter=(operatingSystem eq 'android' or operatingSystem eq 'iOS' or operatingSystem eq 'iPadOS') and managedDeviceOwnerType eq 'company' and (userPrincipalName ne null and userPrincipalName ne '')
Thanks,
Harsh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2025 07:25 AM
Hi @Harsh Vardhan ,
I have tried like this but was not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2025 03:40 AM
Hi Chandra
this is because of the spaces and quotes. you need to replace them with this chars: %27 for " and %20 for the spaces.
Then it will work.
Cheers,
Elias