Hello @selvi_ranganathan welcome to the community!
Are you by chance mistaking groups
for roles
? Here is an example of adding roles to tokens in the context of a Rule, and here within the context of an Action.
We recommend using Actions if you can, hope this helps