Authorization Extenstion: Group information not getting added to user context

I am using Authorization Extension to manage groups & roles.

As per the documentation, https://auth0.com/docs/customize/extensions/authorization-extension/configure-authorization-extension after publishing the rule. The group information is supposed to get added to the user context which can then be added to the token.

But I am not able to get the group information in the user context in the Actions.
The groups come as empty.

exports.onExecutePostLogin = async (event, api) => {
const assignedGroups = (event.user || {}).groups;

api.idToken.setCustomClaim(${namespace}/groups, assignedGroups);
api.accessToken.setCustomClaim(${namespace}/groups, assignedGroups);

};

Am I missing something?

I am in a new account that does not have rules or auth0 pipelines. Only available option is Flows with actions.
Will this cause a problem in using ‘Publish Rule’ from auth0 extension?

Edit: Additional information

Hey there @srihari welcome to the community!

The authorization extension is not supported in Actions - The recommendation is to use Authorization Core in combination with RBAC and/or Organizations to represent groups, teams, etc.

Thanks for the response!

I did look at Authorization Core. I believe it doesn’t support Groups atm. We are in need of Groups within an organization.

Do you have any suggestions on how we can achieve this?

As a workaround to get Authorization Extension working, I have enabled ‘Persistence’ which updates User profile which in-turn adds the group information in app_metadata. I’m thinking of using this app_metadata in actions to update my JWT token. Would love your thoughts on this solution?

Also, in general do you suggested using Authorization Extension? Or is this a legacy deprecated (or to be) product?