# Retrieve user's direct permissions

**URL:** <https://community.auth0.com/t/retrieve-users-direct-permissions/86679>\
**Category:** Get Help\
**Tags:** auth0\
**Created:** [July 9, 2022, 3:52am UTC](https://community.auth0.com/t/retrieve-users-direct-permissions/86679 "2022-07-09T03:52:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pschonwiesner](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/pschonwiesner/32/38652_2.png) [@pschonwiesner](https://community.auth0.com/u/pschonwiesner)\
**Post date:** [July 9, 2022, 3:52am UTC](https://community.auth0.com/t/retrieve-users-direct-permissions/86679/1 "2022-07-09T03:52:50Z")

</div>

Hello, i’m testing authentication and authorization, i could retrieve roles and roles’s permissions, but i can´t retrieve direct permissions in user. I’m use rules for add this permission in access token.

```auto
function (user, context, callback) {
  var map = require('array-map');
  var ManagementClient = require('auth0@2.17.0').ManagementClient;
  var management = new ManagementClient({
    token: auth0.accessToken,
    domain: auth0.domain
  });

  var params = { id: user.user_id, page: 0, per_page: 50, include_totals: true };
  management.getUserPermissions(params, function (err, permissions) {
    if (err) {
      // Handle error.
      console.log('err: ', err);
      callback(err);
    } else {
      var permissionsArr = map(permissions.permissions, function (permission) {
        return permission.permission_name;
      });
      console.log('permissions' + permissionsArr);
      context.idToken[configuration.NAMESPACE + 'user_authorization'] = {
        permissions: permissionsArr
      };
    }
    callback(null, user, context);
  });
}

```

For now, i use the dashboard for configuration.  
How i cant retrieve thats direct permissions.  
Thanks

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [August 26, 2022, 11:34pm UTC](https://community.auth0.com/t/retrieve-users-direct-permissions/86679/3 "2022-08-26T23:34:06Z")

</div>

Hello there - Sorry for the delayed response here and @pschonwiesner welcome to the community!

The following post outlines the current state of accessing direct permissions via extensibility rules/actions:

> [@How to get directly assigned permissions in access token?](https://community.auth0.com/t/how-to-get-directly-assigned-permissions-in-access-token/86550/3):
>
> Hello there @rjoshi_auth0 ! Unfortunately, this is a bit of a tricky situation for which there is to my knowledge no elegant solution. This is a common question as you can see in the following topics/solutions: Specific to adding permissions via a Rule: And Action: The primary reason this isn’t really a viable solution is that Management API [limits](https://auth0.com/docs/troubleshoot/customer-support/operational-policies/rate-limit-policy/management-api-endpoint-rate-limits) are rather low. This could be a good candidate for a [feedback](https://community.auth0.com/c/feedback/95) request as I’m not seeing anything related to this after some quick searching. …

Hope this helps to clear things up a bit!

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [September 10, 2022, 11:34pm UTC](https://community.auth0.com/t/retrieve-users-direct-permissions/86679/4 "2022-09-10T23:34:34Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
