@dan-auth0 can I be more specific around my request for rules. I have setup the “Add user roles from a SQL Server database” which applies the user’s role into a roles
array in the tokens. It does not, however, add the scopes (e.g. read:data) into the permissions
array on the access_token.
If I add the role to the user through the Auth0 dashboard, the scopes are added as permissions as expected.
I am probably missing something, and I realise I can use the Auth0 Management API to allocate/deallocate roles to users. Maybe this is the answer.
It just seems elegant to apply the roles during login via rules, and that was my request.
Cheers.