nomoreplaN
ZITADEL14mo ago
nomorepla

Search User Grants userIdQuery results in 400

Hello!
I'm trying to query by userIdQuery on /management/v1/users/grants/_search and is seems to fail when I introduce queries w\o it it works.

{"code":3, "message":"proto: syntax error (line 9:17): unexpected token {"}

If you can advise any other way of retrieving user roles using session token or service user, we would really appreciate that.
(our setup is frontend app using restful api to access backend, so far we achieved only auth using session api)

Thank you!

curl -i -X POST \
   -H "Content-Type:application/json" \
   -H "Authorization:Bearer eyJ..." \
   -d \
'{
      "query":{
         "user":{
            "offset":"0",
            "asc":true,
            "limit":"100"
         }
      },
      "queries":{
         "userIdQuery":{
            "userId":"291698014836228125"
         }
      }
}' \
 'http://localhost:8080/management/v1/users/grants/_search'
Was this page helpful?