What params are needed for management api call to add permissions to a user

For the management api I want to add a permission to a user.
I got the current permissions, and tried to use the returned data structure as the input for adding permissions but I get an invalid json format error.

I am using the Auth0 Management Api though the website: https://auth0.com/docs/api/management/v2#!/Users/post_permissions

And the documentation only shows this
image
for what to add to body.

What is Object?

Hi @meaganh,

Thanks for reaching out to the Auth0 Community!

When calling the Management API’s Assign Permissions to a User endpoint, the body of the request should look something like the following:

{
  "permissions":[
  {
    "permission_name": "read:users",
    "resource_server_identifier": "https://www.my-api.example.com"
  }
]
}

I hope this helps!

Please reach out if you have any additional questions.

Thanks,
Rueben

1 Like

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