This article explains how to generate a list of all users with a specific email domain using a group rule in Okta.
NOTE: This method should only be used if Rockstar is unable to be installed in the environment or if a new group is desired. Otherwise, Rockstar can be used to generate a list without creating a group.
- User administration
- Group administration
Follow the steps or video below:
- Go to Admin > Directory > Groups.
- Select Rules and click Add Rule.
- Enter a Rule name.
- Select Use Okta Expression Language.
- Enter the following expression:
String.stringContains(user.login, "@specificDomain.com")- Assign the rule to a group and click Save.
- Return to Rules and change the rule status to Active.
- If necessary, use an Application Programming Interface (API) call to List Group Members.
