# Default role with Authorization Extension

**URL:** <https://community.auth0.com/t/default-role-with-authorization-extension/55333>\
**Category:** Get Help\
**Tags:** authorization-extens\
**Created:** [December 24, 2020, 7:14pm UTC](https://community.auth0.com/t/default-role-with-authorization-extension/55333 "2020-12-24T19:14:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![xliu617](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/xliu617/32/26506_2.png) [@xliu617](https://community.auth0.com/u/xliu617)\
**Post date:** [December 24, 2020, 7:14pm UTC](https://community.auth0.com/t/default-role-with-authorization-extension/55333/1 "2020-12-24T19:14:13Z")

</div>

Hi guys I am new to auth0, I wonder if it is possible to automatically grant all new users a default role through Authorization Extension?

I have found a rule script for Authorization core, but seems it doesn’t work for authorization extension ☹

Thank you very much for help

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [December 28, 2020, 8:28pm UTC](https://community.auth0.com/t/default-role-with-authorization-extension/55333/3 "2020-12-28T20:28:43Z")

</div>

Hi @xliu617,

Welcome to the Community!

Using a similar process to “[How do I add a default role to a new user on first login?](https://community.auth0.com/t/how-do-i-add-a-default-role-to-a-new-user-on-first-login/25857)”, you can make an API call to the [Authorization Extension API](https://auth0.com/docs/api/authorization-extension#introduction) to add a new role to the user.

It shouldn’t be too complicated, let me know if you run into any issues.

---

<div class="post-metadata">

**Author:** ![xliu617](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/xliu617/32/26506_2.png) [@xliu617](https://community.auth0.com/u/xliu617)\
**Post date:** [December 29, 2020, 9:13am UTC](https://community.auth0.com/t/default-role-with-authorization-extension/55333/4 "2020-12-29T09:13:35Z")

</div>

Hi Dan,

Thank you very much for help 🙂

I have also found the solution you linked. I have tried it but it seems the script (rules) only work for Authorization Core.  
I wonder how to add those rules for the Authorization Extension?

Thank you very much

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [December 29, 2020, 5:57pm UTC](https://community.auth0.com/t/default-role-with-authorization-extension/55333/5 "2020-12-29T17:57:18Z")

</div>

Yes, you should be able to call the authorization extension API to add the role to the user. (It looks like I added the wrong link in my original post. Here is the link to the [authorization extension API docs](https://auth0.com/docs/api/authorization-extension#introduction).

Specifically, you can use [this endpoint](https://auth0.com/docs/api/authorization-extension#add-user-to-roles) to add a role to your user in the authorization extension.

---

<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:** [January 21, 2021, 7:08pm UTC](https://community.auth0.com/t/default-role-with-authorization-extension/55333/6 "2021-01-21T19:08:27Z")

</div>

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