Graph API - How can I filter user by more than one identity?

Maluenda Miranda, Cristian G 116 Reputation points

I am trying to filter users by the identity. For one criteria I have no problem:$filter=identities/any(c:c/issuer eq '' and c/issuerAssignedId eq 'myuser')

But, I need to search for different prefix, that means for myuser I would like to find the accounts:
* myuser
* prefix01.myuser
* prefix02.myuser

I tried to do something like:

identities/any(c:c/issuer eq '' and (c/issuerAssignedId eq 'myuser' or c/issuerAssignedId eq 'prefix01.myuser'))

But, the query was too complex for the Graph API :(.

Any suggestion beside of execute a request for each criteria?


Microsoft Graph Users API
Microsoft Graph Users API
A Microsoft API that allows you to build compelling app experiences based on users, their relationships with other users and groups, and the resources they access for example their mails, calendars, files, administrative roles, group memberships.
726 questions
Microsoft Graph SDK
Microsoft Graph SDK
A Microsoft software developer kit designed to simplify building high-quality, efficient, and resilient applications that access Microsoft Graph.
882 questions
{count} votes