# Auth0 delegated admin

**URL:** <https://community.auth0.com/t/auth0-delegated-admin/22395>\
**Category:** Get Help\
**Tags:** delegated-admin\
**Created:** [March 10, 2019, 2:14pm UTC](https://community.auth0.com/t/auth0-delegated-admin/22395 "2019-03-10T14:14:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![arnaringig](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/arnaringig/32/11667_2.png) [@arnaringig](https://community.auth0.com/u/arnaringig)\
**Post date:** [March 10, 2019, 2:14pm UTC](https://community.auth0.com/t/auth0-delegated-admin/22395/1 "2019-03-10T14:14:37Z")

</div>

I have gone through the tutorial on how to setup the auth0-delegated-admin extension.  
I have updated a user´s metadata to include an administrative role as described.  
However I get the following error when logging in to retrieve a list of users:

**Oh snap!** An error occurred while loading the users list: Cannot perform action. Missing scope read:users

And in console I get:  
Failed to load resource: the server responded with a status of 403 (Forbidden)

Is anyone familiar with this error? I saw that someone posted a similar question last summer but never seems to have gotten an answer.

Best regards  
-A

---

<div class="post-metadata">

**Author:** ![emsearcy](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/emsearcy/32/7981_2.png) [@emsearcy](https://community.auth0.com/u/emsearcy)\
**Post date:** [April 6, 2019, 12:40am UTC](https://community.auth0.com/t/auth0-delegated-admin/22395/2 "2019-04-06T00:40:15Z")

</div>

I ran into this issue too (and found this post) but ended up resolving it.

For me, it was a matter of getting the id token role claim right.

The documentation is a little misleading, it says stuff about legacy/non-compliant but that’s only if you export using user.role, the other way is to namespace it into context.idToken with a URL, then you don’t need the legacy setting.

Your custom claim _must_ start with “https:” and end with “auth0-delegated-admin” (this is defined in the source code of the extension).

My problem was that I had:

```
const namespace = 'https://sso.example.org/claims/'; // use your own domain
if (someCondition) {
   context.idToken[`${namespace}auth0-delegated-admin`] = ['Delegated Admin - Operator'];
}

```

when I really needed:

```
const namespace = 'https://sso.example.org/claims/'; // use your own domain
if (someCondition) {
   context.idToken[`${namespace}auth0-delegated-admin`] = { roles: ['Delegated Admin - Operator'] };
}

```

Now it works!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [April 15, 2019, 2:28pm UTC](https://community.auth0.com/t/auth0-delegated-admin/22395/3 "2019-04-15T14:28:11Z")

</div>

Thanks a lot for sharing that @emsearcy! Have you had a chance to see that @arnaringig?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [April 30, 2019, 2:28pm UTC](https://community.auth0.com/t/auth0-delegated-admin/22395/4 "2019-04-30T14:28:11Z")

</div>

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