Skip to content

Double quotes around $search values #399

Closed

Description

@peombwa

From the docs, most if not all, $search values specify a double quote.

The generate commands serializes $search values without double quotes thus leading to an error when executing the following command Get-MgUser -Search "displayName:peter" -Debug (https://graph.microsoft.com/beta/users?$search=displayName:peter).

A work around is to single quote the double quote - Get-MgUser -Search '"displayName:peter"' -Debug (https://graph.microsoft.com/beta/users?$search="displayName:peter").

It would be nice if the SDK handled this for customers.

The same issue also exists in the the .NET SDK:

List<Option> options = new List<Option>{ new QueryOption("search", "displayName:peter")};
var users = await _graphServiceClient.Users.Request(options).GetAsync();

G.E repro
AB#6412

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions