Auth0 Home Blog Docs

"Query validation error" on fields parameter

app_metadata

#1

I have a User who has the following object as app_metadata:

{
  "foo/bar": "baz",
  "qux": "quux"
}

When I tried to get "baz" by excluding other fields with https://me.auth0.com/api/v2/users?fields=app_metadata.foo%2Fbar&search_engine=v2, I got the following error response:

{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "Query validation error: 'String does not match pattern ^(([a-zA-Z0-9_\\\\.]+))(,(([a-zA-Z0-9_\\\\.]+)))*$: app_metadata.foo/bar' on property fields (A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields).",
  "errorCode": "invalid_query_string"
}

The pattern seems to restrict keys which contain /, which is perfectly permitted to be used as the name of app_metadata keys.

Is this behavior intended?


#2

I have reproduced this behaviour and have logged an issue for this. Unfortunately, we cannot commit to any ETA for a fix.


#3

https://github.com/auth0/api2/issues/1644


#4