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

Searching users with a single quote in the people picker doesn't work #88

Closed
Yvand opened this issue Jun 12, 2020 · 0 comments
Closed
Assignees
Milestone

Comments

@Yvand
Copy link
Owner

Yvand commented Jun 12, 2020

Using AzureCP 16.0, in the people picker, you type a value with a single quote, for example: user', and it returns an error.
In the logs, AzureCP records this:

06/12/2020 09:54:22.11	w3wp.exe (0x1818)	0x0570	AzureCP	Lookup	1337	VerboseEx	[AzureCP] Querying Azure AD tenant 'TENANT.onMicrosoft.com' for users/groups/domains, with input 'user''	
06/12/2020 09:54:22.16	w3wp.exe (0x1818)	0x0570	AzureCP	Lookup	1337	Unexpected	[AzureCP] Unexpected error(s) occurred while querying Azure AD tenant 'TENANT.onMicrosoft.com':  [EXCEPTION 1]: Microsoft.Graph.ServiceException: Code: BadRequest  Message: Invalid filter clause  Inner error:

Cause:
Single quotes should be double escaped as documented in https://docs.microsoft.com/en-us/graph/query-parameters#escaping-single-quotes

@Yvand Yvand self-assigned this Jun 12, 2020
@Yvand Yvand added the bug label Jun 12, 2020
Yvand added a commit that referenced this issue Jun 12, 2020
@Yvand Yvand added this to the Version 17 milestone Jun 12, 2020
@Yvand Yvand closed this as completed Jun 15, 2020
@Yvand Yvand mentioned this issue Jun 22, 2020
Yvand added a commit that referenced this issue Jun 22, 2020
* Fix error when earching users with a single quote in the people picker - #88
* Use batch requests when relevant to optimize network performance
* Avoid potential null reference exception in method AzureCP.ProcessAzureADResults() and ensure that method AzureCP.QueryAzureADTenantAsync() never returns null
* Update target framework to v4.6.1
* Update NuGet package Microsoft.Graph 1.21.0 -> Microsoft.Graph 3.8.0
* Update NuGet package Microsoft.IdentityModel.Clients.ActiveDirectory 5.2.6 -> Microsoft.IdentityModel.Clients.ActiveDirectory 5.2.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant