Techniques for identity management, and more particularly, to techniques for dynamically assigning membership to users in the system based on dynamic rules. In one aspect a computer-implement method is provided that breaks down the processing from a single large thread or operation into multiple minutest level threads or operations and makes use of event driven architecture used in distributed environments such as a cloud environment, to achieve a scalable model and can work seamlessly for multi-tenant applications. Every sub problem is assigned to a dedicated set of subscribers on a messaging service for processing.