Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double-filtering in list users sample #9457

luckerby opened this issue Aug 11, 2020 · 1 comment

Double-filtering in list users sample #9457

luckerby opened this issue Aug 11, 2020 · 1 comment


Copy link

luckerby commented Aug 11, 2020

On the List users API page there's the following example:

GraphServiceClient graphClient = new GraphServiceClient( authProvider );

var queryOptions = new List<QueryOption>()
	new QueryOption("filter", "signInActivity/lastSignInDateTime le 2019-06-01T00:00:00Z")

var users = await graphClient.Users
	.Request( queryOptions )
	.Filter("signInActivity/lastSignInDateTime le 2019-06-01T00:00:00Z")

Besides the fact that double-filtering is used, this code will throw an exception when run: Microsoft.Graph.ServiceException: Code: BadRequest Message: Query option '$filter/filter' was specified more than once, but it must be specified at most once.

Either the Filter method should be removed, or the QueryOptions variable taken out while using Request().

Document Details

Do not edit this section. It is required for ➟ GitHub issue linking.

Copy link

krbain commented Sep 10, 2020

Thanks for the feedback. Yes, there's a bug in the sample code. We will update the doc to address it. Closing this issue.

@krbain krbain closed this as completed Sep 10, 2020
@msftbot msftbot bot locked as resolved and limited conversation to collaborators Sep 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

No branches or pull requests

3 participants