Assigning Default permissions to user on login with Auth0 Actions

Hi,

Assuming there is no other way of assigning permissions to a user on login and/or creation apart from using an action, what action code would be needed to do similar as per roles: Assigning a Default Role to Users on Sign-Up with Auth0 Actions

Thanks

1 Like

Hi @dmiller

Thank you for reaching out to us!

In essence, a role is a set/collection of permissions that you assign to your users and our RBAC feature is designed to handle the management of user permissions as roles. Once RBAC is enabled for your API, it is possible to assign users specific permissions via the Management API or the Auth0 Dashboard, although adding permissions directly to a user circumvents the benefits of role-based access control (RBAC) and is not typically recommended.

I was able to find these additional resources that outline this use-case and also how to add permissions to the Access/ID Tokens:

Hope this helped!
Gerald

2 Likes

Thanks @gerald.czifra ,

That certainly pointed me in the right direction.

One thing to note, the ManagementClient API has been updated since those posts, so the actual creation of permissions is now more akin to:

management.users.permissions.create(userId, data);

Thanks :slight_smile:

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