From the [docs](https://docs.microsoft.com/en-us/graph/query-parameters?context=graph%2Fapi%2Fbeta&view=graph-rest-beta#search-parameter), 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: ``` cs List<Option> options = new List<Option>{ new QueryOption("search", "displayName:peter")}; var users = await _graphServiceClient.Users.Request(options).GetAsync(); ``` [G.E repro](https://developer.microsoft.com/en-us/graph/graph-explorer?request=users%3F%24search%3DdisplayName%3Apeter&method=GET&version=v1.0&GraphUrl=https://graph.microsoft.com) [AB#6412](https://microsoftgraph.visualstudio.com/0985d294-5762-4bc2-a565-161ef349ca3e/_workitems/edit/6412)
Activity
peombwa commentedon Sep 24, 2020
It's worth verifying if this won't affect other workload calls.
peombwa commentedon Oct 26, 2020
Related to