I want to search graph API users for everyone whos name does not start with some value
I tried
https://graph.microsoft.com/v1.0/users?$filter="NOT startswith(displayName,'J')"
https://graph.microsoft.com/v1.0/users?$filter=not(startswith(displayName,'J'))
But I get
Invalid filter clause
Is there any way to achieve this?
I actually need to do this in C#, where I run into the same issue - I wonder if there is a way of specifying NOT STARTSWITH
using the SDK?
string filter = String.Format("startswith(displayName,'J')");
List<QueryOption> options = new List<QueryOption>
{
new QueryOption("$filter", filter)
};
var users = await graphClient.Users
.Request(options)
.Top(500)
.GetAsync();