Filtering by employeeType: How to apply le or ge on a string type? How to set the ConsistencyLevel header?

Hello,
I would like to filter a users request by EmployeeType where the employee type is not null. Something like this:
var resp = await _gsclient.Users.GetAsync((rc) =>
{
rc.QueryParameters.Select = new string[]
{ "id",
"userPrincipalName",
"employeeType",
"accountEnabled"
};
rc.QueryParameters.Filter = "employeeType not eq null";
});
According to https://learn.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-beta eq
on null
values is not supported for employeeType, whereas eq
, ne
, not
, ge
, le
, in
, startsWith
is supported. So I had the idea to use 'ge' instead like
var resp = await _gsclient.Users.GetAsync((rc) =>
{
rc.QueryParameters.Select = new string[]
{ "id",
"userPrincipalName",
"employeeType",
"accountEnabled"
};
rc.QueryParameters.Filter = "employeeType.length ge 1";
});
That length property is just an assumption. I have no idea how to apply ge or le on a string type. Greater or equal than what?
Additional question: while searching for a hint, I found in https://learn.microsoft.com/en-us/answers/questions/377469/ms-graph-filter-users-using-employeetype that filtering using employeeType only works if the count parameter is added and I would have to set the ConsistencyLevel
header with the value of eventual
. How to set this header when using the SDK?
Thank you.