You can assign permissions to a user using the or the . The assigned permissions can be used with the API Authorization Core feature set.
Adding permissions directly to a user circumvents the benefits of role-based access control (RBAC) and is not typically recommended.

Prerequisites

  • For role-based access control (RBAC) to work properly, you must enable it for your API using either the Dashboard or the Management API. The Authorization Core functionality is different from the Authorization Extension. For a comparison, read Authorization Core vs. Authorization Extension.
  • Set up an API in the Dashboard.
  • Permissions are selected from pre-defined values. If your list of roles is blank, make sure you add permissions for your API.

Dashboard

There are two ways to assign a permission to a user. You can choose a user from the Users list and then assign a permission or you can go to the User Details (user profile) page for an individual user and choose a permission to assign in the Permissions tab.

Assign permission in user list

  1. Go to Dashboard > User Management > Users.
  2. Click ... next to the user you want to modify, and select Assign Permissions.
  3. Select the API from which you want to assign permissions, then select the permissions to assign to the user, and click Add Permissions.

Assign permissions in user profile

You can also assign permissions to users from their individual profile page.
  1. Go to Dashboard > User Management > Users, and click the name of the user to view.
  2. Click the Permissions tab, and click Assign Permissions.
  3. Select the API from which you want to assign permissions, then select the permissions to assign to the user, and click Add Permissions.

Management API

Make a POST call to the Assign User Permissions endpoint. Be sure to replace USER_ID, MGMT_API_ACCESS_TOKEN, API_IDENTIFIER, and PERMISSION_NAME placeholder values with your user ID, Management API , API identifier(s), and permission name(s), respectively.
curl --request POST \
  --url 'https://{yourDomain}/api/v2/users/USER_ID/permissions' \
  --header 'authorization: Bearer MGMT_API_ACCESS_TOKEN' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
  --data '{ "permissions": [ { "resource_server_identifier": "API_IDENTIFIER", "permission_name": "PERMISSION_NAME" }, { "resource_server_identifier": "API_IDENTIFIER", "permission_name": "PERMISSION_NAME" } ] }'
ValueDescription
USER_IDΤhe ID of the user for whom you want to assign permissions.
MGMT_API_ACCESS_TOKENAccess Token for the Management API with the scope update:users.
API_IDENTIFIERIdentifier(s) of the API(s) associated with the permission(s) you would like to assign for the specified user.
PERMISSION_NAMEName(s) of the permission(s) you would like to assign for the specified user.

Learn more