Skip to main content
POST
https://{tenantDomain}/api/v2
/
users
/
{id}
/
permissions
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Users;
using System.Collections.Generic;

public partial class Examples
{
    public async Task Example() {
        var client = new ManagementClient(
            token: "<token>"
        );

        await client.Users.Permissions.CreateAsync(
            id: "id",
            request: new CreateUserPermissionsRequestContent {
                Permissions = new List<PermissionRequestPayload>(){
                    new PermissionRequestPayload {
                        ResourceServerIdentifier = "resource_server_identifier",
                        PermissionName = "permission_name"
                    },
                }

            }
        );
    }

}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

ID of the user to assign permissions to.

Body

permissions
object[]
required

List of permissions to add to this user.

Minimum array length: 1

Response

Permissions assigned to user.