Hi Guys,
I’m new here, so apologies in advance if this is a stupid question. I’ve tried many many things, but can’t seem to be able to get this to work.
Simple Scenario-
I followed the instruction from Auth0 Quickstart pages, and have developed a simple SPA+Server API application.
I have also created the Roles and Permission using the Authorization Extension, and have set up ‘Rules’ to add the roles+permission to the access-token when user logs in.
When trying to create a new user programmatically, I use the NodeJS SDK, and call ManagementClient.createUser() function, which successfully creates the user.
The problem -
When I try to programmatically assign the Role (defined in Authorization extension) to the newly created user, I am unable to access any Roles from the Auth Extension. For example, ManagementClient.getRoles() simply returns an empty array (most likely because all roles are defined in the Authorization Extension, and not in Auth0’s Core.
Even if I manually try to assign the Role (from Auth Ext_) to the newly created user using hardcoded Role_ID, it throws error because the ManagementClient cannot find that role.
How do I make this work? How do I use the Management API to assign role to a user, when the roles are actually defined in the Authorization Extension?
Thanks in advance for all your help.