Define user permissions
Manage users
Roles allow you to group permissions into buckets. A role in Kinde could represent a collection of permissions available to an owner, an administrator, a member or whatever role structure is relevant to your business.
This topic covers how to manage roles in the Kinde platform and via the Kinde Management API.
admin and owner role in Org A and a member role in Org BYou can update user roles via the Kinde Management API or using the procedure below.
User roles are dynamic and refreshed via the issued token. This means that any changes you make will be applied to all users assigned that role, the next time they sign in.
We don’t recommend editing role keys, once a role is in use. It will break the code link between your product and the defined role.
You can delete user roles via the Kinde Management API or using the procedure below.
When you delete a user role, you will remove the role as well as all the associated permissions from all users who are assigned that role. This can’t be reversed.
You can add user roles via the Kinde API.
Use the Add Organization User Role end point to assign a role to a user, and get the role IDs from the Roles endpoint.
When a user authorizes against an organization in Kinde, you can enable their roles to be returned as an array of IDs in the roles claim of the access_token. This is part of an additional claim.
Our SDKs commonly ship with a getClaim method to help with this. For example in React you could use something like:
getClaim("roles");// {name: "roles", value: ["admin", "owner"]}Yes. Roles and permissions are defined at the business level, not per environment. A role created in your development environment is the same role in staging and production — there is no per-environment isolation. If your team needs to test role changes without affecting production, manage each environment in a separate Kinde business.