Retrieve user's direct permissions

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.

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

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:

Hope this helps to clear things up a bit!

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