I have a list of emails, which are UPNs (user principal name), which I am using in a query filter to retrieve an information for Azure AD users.
Honestly, I was exploring, trying to figure out the best way to query, knowing that IN {} statement is not supported for the filter. What is supported?
Also, I was testing for the URL length limitation.
Currently, I have only two users in my AD, so, basically, my query looks like with lots of repeatitions:
https://graph.microsoft.com/v1.0/users?$select=id, displayName, userPrincipalName&$filter=userPrincipalName eq ‘Louis@PearsonSpecter.onmicrosoft.com’ or
userPrincipalName eq ‘Quang@PearsonSpecter.onmicrosoft.com’ or userPrincipalName eq ‘Louis@PearsonSpecter.onmicrosoft.com’ or
userPrincipalName eq ‘Quang@PearsonSpecter.onmicrosoft.com’or userPrincipalName eq ‘Louis@PearsonSpecter.onmicrosoft.com’ or
userPrincipalName eq ‘Quang@PearsonSpecter.onmicrosoft.com’or userPrincipalName eq ‘Louis@PearsonSpecter.onmicrosoft.com’ or
userPrincipalName eq ‘Quang@PearsonSpecter.onmicrosoft.com’or userPrincipalName eq ‘Louis@PearsonSpecter.onmicrosoft.com’ or
userPrincipalName eq ‘Quang@PearsonSpecter.onmicrosoft.com’or userPrincipalName eq ‘Louis@PearsonSpecter.onmicrosoft.com’ or
userPrincipalName eq ‘Quang@PearsonSpecter.onmicrosoft.com’or userPrincipalName eq ‘Louis@PearsonSpecter.onmicrosoft.com’ or
userPrincipalName eq ‘Quang@PearsonSpecter.onmicrosoft.com’or userPrincipalName eq ‘Louis@PearsonSpecter.onmicrosoft.com’ or
userPrincipalName eq ‘Quang@PearsonSpecter.onmicrosoft.com’
Opps! I didn’t know that. Did you?
Max allowed is 10. Now we know 🙂