Skip to content
masterclassBuddyTech Buzz5 fresh blogs · 5:00 AM IST

Kinde · Function

getPermissions

getPermissions asynchronously returns all permissions for the current user in the organization they are signed in to. The result includes the organization code and an array of permission keys.

How it works

Call getPermissions to asynchronously obtain every permission assigned to the current user within the organization they are signed into. The returned object identifies that organization with orgCode and provides the permission keys in a permissions array.

Syntax

kinde.getPermissions();

Returns

A Promise resolving to an object containing orgCode and permissions, where permissions is an array of permission keys.

Key points

  • The function returns the complete permission set for the current user’s active organization.
  • The permissions field is an array of permission-key strings.
  • The response includes orgCode to identify the organization associated with the permissions.
  • The permission data originates in a permissions claim carried by the access token.

Common mistakes

  • Configure the application to read permissions before relying on the returned access data.

Example: Read the current user's permissions

const { getPermissions } = useKindeAuth();

const runAsyncFunction = async () => {
  const permissions = await getPermissions();
  console.log(permissions);
};

runAsyncFunction();

Asynchronously retrieves the signed-in user's permissions and logs the organization code and permission keys.

When to use it

Load available capabilities

Render or enable features based on the user's complete access set.

Scope access to an organization

Associate authorization data with the organization currently selected by the user.

Build a permission-aware interface

Inspect several permissions at once before constructing an access-aware view.

Interview questions

QWhat does getPermissions return?

getPermissions returns all permissions for the current user in their signed-in organization. In the JavaScript SDK, the result contains orgCode and a permissions array.

Follow-up: How would you check one permission? Use getPermission with the permission key and inspect its isGranted value.

QWhat is the signature of getPermissions?

The call takes no arguments and is used as kinde.getPermissions(). The documented result includes the organization code and permission keys such as create:todos or read:todos.

Follow-up: How can permissions be made available to the application? Configure the permissions in Kinde and ensure the application reads the access token data.

QWhy does the response include orgCode?

Permissions are organization-scoped: the function reports permissions for the organization in which the user is currently signed in. The response separates that organization identifier from the permissions list.

Follow-up: What should code do when it needs a single authorization decision? Call getPermission for the relevant key rather than scanning the complete list.

  • getPermission
  • useKindeAuth
  • permissions
  • orgCode

Source: JavaScript SDK - Kinde docs. Checked 2026-10-15.