Create Role with Permission
A 4-step recipe with Kinde. We can help you get access.
Recipe · 4 steps
Create Role with Permission
with Kinde · Identity & Access Management
Create a permission and a role, then bind the permission to the role.
- Create the permission. The create endpoint returns a success envelope only, so the permission id is resolved in the next step.
- List permissions and locate the one whose key matches the permission just created so its id can be attached to the role.
- Create the role that the permission will be attached to. Returns the new role's id.
- Attach the resolved permission to the new role by submitting the permission id in the role permissions update.
What you'll need to have ready
- permissionName: The display name of the permission to create.
- permissionKey: The code-facing key for the permission (e.g. "create:invoices").
- permissionDescription: Optional description of the permission.
- roleName: The display name of the role to create.
- roleKey: The code-facing key for the role (e.g. "billing_admin").
- roleDescription: Optional description of the role.
For your developer
Arazzo workflow kinde:create-role-with-permission, 4 operations: CreatePermission → GetPermissions → CreateRole → UpdateRolePermissions. Specs on APIs.io.