I want to add users to splunk via a DL and they need to be assigned with roles.
AFAIK, it can't be done.
If you're adding users for local Splunk authentication then they must be added and assigned roles individually.
If you're adding them for SSO authentication then they should be added to the identity provider and assigned to one or more groups. Those groups then need to be mapped to Splunk roles