One method of doing this is to use the IG client tool.
Use the "Discover Characteristic Roles" method.
Select "Resource Attribute". The default range will be all attributes.
Set the minimums to 1 (and maximum=1).
This will create one role per AD Group. You can rename these as needed.
When you export these to IM, the Roles will be Created, the Account Templates will be created, and the Users will be linked to the roles.
You could also create a Kettle process to do the same thing.