Transforming One Group Into Two With Groovy
Map/ Edit the mapping for the Groups attribute in the Attribute Mapping section

Use Groovy Code as Source Type and paste the Groovy Code from below.

You'll need to adjust the group names accordingly:
- // Input your data as per the descriptions below
- // Replace YourIDPGroupAttribute with your actual IdP Group Attribute
- def idpGroupAttribute = "groups"
- // the group with all the users you want to manage with license optimizer
- def idpGroupName = "Okta_Jira_Users"
- // adding the user to both the Allowed users- and the License Group
- def replacements = ["jira-software-users", "jira-software-licensed-users"]
- // No need to change anything from here on
- def groups = mapping.get(idpGroupAttribute)
- if (groups.contains(idpGroupName)) {
- groups.remove(idpGroupName)
- groups.addAll(replacements)
- }
- return groups