<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
0D54z00009DFMXuCAPOkta Identity EngineWorkflowsAnswered2026-04-03T09:00:22.000Z2023-05-24T13:19:08.000Z2023-05-25T11:17:12.000Z

3dl5q (3dl5q) asked a question.

Workflow check group scenario

Hi there, we'd like to get a basic workflow automation for the following scenario:

1. We have a "Group 1", "Group 2" and "Group 3" with users in which all gives access to an application

2. We have a group rule that states all users from the Everyone group must be added into "Group 3"

3. However if users are in "Group 1" or "Group 2" they should be removed from "Group 3".

 

How would we go about actioning this in Workflows?


  • TimL.58332 (Workflows)

    @3dl5q (3dl5q)​  This isn't a use case you would solve with Workflows. While it can be solved with Workflows you are far better off leveraging Group Rules with an Okta Expression that meets your use case.

     

    For example in my test env:

     

    28 total users.

    1 deactivated user

    4 unique users in group2/3 (1 is in both groups)

     

    EVERYONE: 00g1sgh3rwQU8rpyu1d7

    Group2 00g7ds0mjuIG4ATx41d7

    Group3 00g7ds0pjixxCoNLN1d7

     

     

    user.isMemberOfGroup("00g1sgh3rwQU8rpyu1d7") && !isMemberOfAnyGroup("00g7ds0mjuIG4ATx41d7","00g7ds0pjixxCoNLN1d7")

     

    Results: 23 people assigned to Group1

     

     

    Expand Post
    Selected as Best
  • TimL.58332 (Workflows)

    @3dl5q (3dl5q)​  This isn't a use case you would solve with Workflows. While it can be solved with Workflows you are far better off leveraging Group Rules with an Okta Expression that meets your use case.

     

    For example in my test env:

     

    28 total users.

    1 deactivated user

    4 unique users in group2/3 (1 is in both groups)

     

    EVERYONE: 00g1sgh3rwQU8rpyu1d7

    Group2 00g7ds0mjuIG4ATx41d7

    Group3 00g7ds0pjixxCoNLN1d7

     

     

    user.isMemberOfGroup("00g1sgh3rwQU8rpyu1d7") && !isMemberOfAnyGroup("00g7ds0mjuIG4ATx41d7","00g7ds0pjixxCoNLN1d7")

     

    Results: 23 people assigned to Group1

     

     

    Expand Post
    Selected as Best
  • 3dl5q (3dl5q)

    Thank you that was absolutely fantastic. I didn't know you could make a negative statement with "!" so I thought workflows was intended for this use case.

This question is closed.
Loading
Workflow check group scenario