Relevance help for auto groups

Looking for help to create an automatic group based on usernames, this group will be used to capture all members of a particular dept