# User Search Query support for special characters

**URL:** <https://community.auth0.com/t/user-search-query-support-for-special-characters/96612>\
**Category:** Get Help\
**Tags:** user-search, user-management\
**Created:** [December 16, 2022, 12:26pm UTC](https://community.auth0.com/t/user-search-query-support-for-special-characters/96612 "2022-12-16T12:26:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![neer30](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@neer30](https://community.auth0.com/u/neer30)\
**Post date:** [December 16, 2022, 12:26pm UTC](https://community.auth0.com/t/user-search-query-support-for-special-characters/96612/1 "2022-12-16T12:26:33Z")

</div>

Currently, I am trying to fetch the users list via the app\_metadata in which I multiple level.  
The search seems to works pretty well until when we provide any special character as a key to search.

i.e.  
In this case when the value contains special character it works.

```auto
https://...../api/v2/users?q=app_metadata.key1.key2:"value"&search_engine=v3

```

but in the below case when the key2 contains any special character it throws an parsing error

```auto
https://...../api/v2/users?q=app_metadata.key1.key2:"value"&search_engine=v3

```

by special characters I mean =\>

\*_!, @, #, =, $, %, ^, &, , (, ), \_, +, {, }, etc._

Is there any possible way this issue can be resolved?

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [December 16, 2022, 10:17pm UTC](https://community.auth0.com/t/user-search-query-support-for-special-characters/96612/3 "2022-12-16T22:17:23Z")

</div>

Hi @neer30 ,

Welcome to the Auth0 Community!

I tested this with the [get user](https://auth0.com/docs/api/management/v2#!/Users/get_users) endpoint, with the below app\_metadata attributes having special characters such as `+` and `&` in the key or value.

```auto
{
"user_field":{
  "user_field2":"ab+d",
  "user+field3":"ab+e"
},
  "user&field1":"ab+c"
}

```

And the following queries return the results. I did not see any error.

`app_metadata.user_field.user_field2:"ab+d" `

`app_metadata.user_field.user+field3:"ab+e" `

`app_metadata.user&field1:"ab+c" `

Could you please provide additional details, such as your query and app\_metadata attributes?

Thanks!

---

<div class="post-metadata">

**Author:** ![neer30](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@neer30](https://community.auth0.com/u/neer30)\
**Post date:** [December 17, 2022, 11:58am UTC](https://community.auth0.com/t/user-search-query-support-for-special-characters/96612/4 "2022-12-17T11:58:34Z")

</div>

Hi @lihua.zhang

Please consider this example.

```auto
{
  "user_field":{
    "user_field2==":"ab+d",
    "user+field3!=":"ab+e"
  }
}

```

The respective query would be like,

```auto
app_metadata.user_field.user_field2==:"ab+d"

```

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [December 26, 2022, 6:05pm UTC](https://community.auth0.com/t/user-search-query-support-for-special-characters/96612/5 "2022-12-26T18:05:47Z")

</div>

Hi @neer30,

Thank you for providing additional details.

with app\_metadata,

```auto
{
  "user_field":{
    "user_field2==":"ab+d",
    "user+field3!=":"ab+e"
  }
}

```

please try below queries to get the results.

```auto
app_metadata.user_field.user_field2\=\=:"ab+d"
app_metadata.user_field.user+field3\!\=:"ab+e"

```

Hope this helps!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [January 9, 2023, 6:06pm UTC](https://community.auth0.com/t/user-search-query-support-for-special-characters/96612/6 "2023-01-09T18:06:28Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
