Azure Active Directory Graph Client 2.0 - Contains Expression

618 views Asked by At

When querying Users etc using the Azure ActiveDirectoryClient it does not seem possible to construct a expression that has the 'Contains' keyword e.g.

activeDirectoryClient.Users.Where(u => u.Surname.Contains(searchString)) .ExecuteAsync()

I can successfully use u.Surname.StartsWith or EndsWith.

Is this supported? If not is there an alternative?

Thanks.

1

There are 1 answers

1
astaykov On BEST ANSWER

Contains is generally not supported by the Graph API itself. And there is no alternative. It is strange that EndsWith works.

You can find more about supported queries and filters on the following official documentation: https://msdn.microsoft.com/en-us/library/azure/dn727074.aspx