<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D51Y000091kxw6SAAOkta Classic EngineAdministrationAnswered2025-10-09T20:48:44.000Z2020-08-26T22:35:50.000Z2020-09-02T22:56:52.000Z

ScottF.86572 (Customer) asked a question.

Is it possible to automatically assign an app to a user based on whether the user has another app already assigned?

I have App1 and App2. I want to automatically assign App2 to a user if they have App1 assigned, and I want to do this on an ongoing basis. My thought was to create a group assigning App2, with an Okta Expression checking whether they are a member of App1, but the expression I came up with doesn't seem to do the trick:

 

String.stringContains(app1.userName,user.login)

 

returns the message "Unsupported expression constructs are used in expression String.stringContains(app1.userName,user.login)".

 

I have verified both that "app1" is the correct name, and "userName" is the correct attribute name. What am I missing?


  • ScottF.86572 (Customer)

    Hi Rus,

     

    Unfortunately neither option will work for my use case. In my particular case, a user is expected to request App1 via self-service, but then will also need App2 assigned in order for App1 to work. Hence why I need to verify membership of App1 with a rule.

  • Hi Scott,

     

    Have you made sure app name is in the required format as mentioned in this screenshot :

    Another approach can be to setup a scheduled job which uses APIs and checks if a users is assigned to App1 and then assigns it to App2 .

    Is there a reason why you do not want to enable Self Service for both apps?

     

     

    Expand Post
    • ScottF.86572 (Customer)

      Hi Priti,

       

      Unfortunately I cannot see that screenshot. My app format is as referenced in my OP.

       

      I considered a scheduled job, but would prefer a user receive access to both apps instantly so as to reduce confusion.

       

      I would love to enable self service for the second app, but I cannot. It has a provisioning component, and Okta will not allow self service (with no approval process) of an app with a provisioning component. Hence the need for a workaround.

      Expand Post
This question is closed.
Loading
Is it possible to automatically assign an app to a user based on whether the user has another app already assigned?