Add user to a group if user is assigned with an application Skip to main content
https://support.okta.com/help/answers?id=9060z000000jjesqas&refurl=http%3a%2f%2fsupport.okta.com%2fhelp%2fanswers
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
1
2
3
4
5
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
Nidhin C KNidhin C K 

Add user to a group if user is assigned with an application

Is it possible to build a Group Rule in such a way that if a user is assigned with a specific application then add that user into a specific group?

I tried with below but does not work

IF $appuser("Box").firstname="Nidhin"
IF appuser("Box").firstname="Nidhin"

Regards,
Nidhin.CK
Jerrell GaryJerrell Gary (Okta, Inc.)
Hello Nidhin C K.

There maybe a workaround for this concern. 

Importing Okta mastered users from a CSV into a group

The client is requesting to import a large number of users that will be Okta mastered into an Okta mastered group from a csv

1. Create a new application, it doesn't even need to be functional. 
2. In the application select the import option.
3. Take your users that you have that need to be imported and put them into the csv template that is available. 
Note that firstname, lastname, email and login are required fields.
4. After they are loaded into the application, create a new group. 
5. Go to the new group and go to manage people
6. Change to search by application and find the app you imported the users from.
7. Select "Add All”

The other workaround might be to use attributes to assign user to a group.

I would use an attribute in the user's profile to assign the user to a group. 

https://support.okta.com/help/articles/Knowledge_Article/Using-Group-Membership-Rules

AD is an "app". It has an attribute called app.namingContext which is the AD domain, eg, "domain1.local".

You could:
Create an Okta user attribute called "domain" (https://help.okta.com/en/prev/Content/Topics/Directory/Directory_Profile_Editor.htm?cshid=Directory_Profile_Editor#Directory_Profile_Editor1)
Map app.namingContext to Okta user "domain" attribute
Create an Okta group for each AD domain, eg "domain1", "domain2", etc.
Create a Group Rule for each AD domain, eg:
IF user.domain equals "domain1.local" THEN Assign to "domain1" group
IF user.domain equals "domain2.local" THEN Assign to "domain2" group
Dylann FezeuDylann Fezeu (Customer First Programs)
Hello Nidhin,

Thanks for posting your inquiry in Okta Community Portal.

If you receive a great answer to your question(s), please help readers find it by marking it the best answer. Hover over the answer and click "Best Answer." 

Thank you,

Dylann Fezeu
Okta Help Center Team