Adding role to a user by code

hi @vivin_joseph
This could be because of the self.validate_roles() in the validate method of user.

Try adding the same role in the “Role Profile” also