I was trying to get all users in my Azure Active Directory filtered by companyName
filtering.
The call I used was
/v1.0/users?$select=id,mail,displayName,department&$filter=companyName%20eq%myComapny
but it is returning an error BadRequest
.
Am I doing something wrong here?
As Dan said, for now filtering on companyname is not supported.
As a workaround, we can use Azure AD v2 powershell to filter it, like this:
Get-AzureADUser | ?{ $_.CompanyName -eq 'company' }
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With