p2-inc / keycloak-orgs

Single realm, multi-tenancy for SaaS apps
Other
361 stars 65 forks source link

How can I add a custom role to a member during registration to the organisation ? #215

Closed priyabrata-munshify closed 3 months ago

priyabrata-munshify commented 3 months ago

Hello,

I created a custom role - role1, I want the role to be added implicitly to all the members who join the organisation. How can I do that ?

xgp commented 3 months ago

There is a membership event that is emitted when a user joins an organization. You could write an event listener that adds them to the role.