Adding Roles from the Authorization Core to each user's raw JSON app_metadata

Hello, i’ve set up an administrator role in my app and I’d like to be able to search for a user based on their roles since the main dashboard does not filter by roles.

I have the search functionality working and I’m able to search by anything within the user’s metadata. Although, I noticed all the roles are empty strings even though I have 5 designated Roles on the “Authorization Core”.

Screen Shot 2020-08-21 at 3.52.26 PM

Is there a way to automate this so that Core Roles will populate into user metadata?

Thanks, Ryan

Hi @jewellry,

You can automate this action with a log stream.

Any time a "type": "sapi", "description": "Assign roles to a user" log comes through, you could make a call to the management API to update the user’s app_metadata.

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