In our system we use Active Directory to store users and then Crowd server is used to authenticate users to the Atlassian systems.
I need to implement a mechanism to add users to the groups in crowd when a new user in AD syncs with crowd. If user email is @xyz.com they should be automatically added to xyz group and If user email is @abc.com they should be automatically added to abc group etc.
How can I do this?