Skip to main content
Version: 2.0.0

Get user permissions

To get all user permissions irrespective of the tenant, you can use the permit.GetUserPermissions function. This function determines all user permissions for every registered resource across all tenants.

Simple Usage

The permit.GetUserPermissions function accepts a "User" as input and optionally a list of tenants to filter, and returns an object containing the details about the request for each assigned tenant, including the assigned tenant's attributes, and the allowed permissions:

const { Permit } = require("permitio");

const permit = new Permit({token: "<YOUR_API_KEY>", ...});
const userPermissions = await permit.getUserPermissions("john@doe.com");
info

Currently, using "GetUserPermissions" works only for RBAC & ReBAC.

Contents