Using the Split operation for JML events in the Active Directory

I am Validating the OU=Users for active directory,e. I am trying a transform as below:
If the User in the OU=users directory I need to take the value and store to compare with conditions.

“HumanAccount”: {
“input”: {
“attributes”: {
“attributeName”: “distinguishedName”,
“sourceName”: “Active Directory”
},
“type”: “accountAttribute”
},
“attributes”: {
“delimiter”: “\=”,
“index”: 3
},
“type”: “split”
},

hey @Dharani_01 , i didn’t quite understand what you asking, or your use case, can you elaborate a little bit?
Best

Try to use this one

{
  "name": "Validate OU=Users",
  "type": "static",
  "attributes": {
    "ou": {
      "type": "split",
      "attributes": {
        "input": {
          "type": "accountAttribute",
          "attributes": {
            "attributeName": "distinguishedName",
            "sourceName": "Active Directory"
          }
        },
        "delimiter": ",",
        "index": 1
      }
    },
    "ouUsers": {
      "type": "conditional",
      "attributes": {
        "expression": "$ou eq 'OU=Users'",
        "positiveCondition": "Users",
        "negativeCondition": "NotUsers"
      }
    },
    "value": "$ouUsers"
  }
}

Hi @Dharani_01,

If you just need to check if the user is part of OU=users, you can use something like below :

{
    "name": "OU Check",
    "type": "static",
    "attributes": {
        "OUCheck": {
            "attributes": {
                "values": [
                    {
                        "attributes": {
                            "attributeName": "distinguishedName",
                            "sourceName": "Active Directory"
                        },
                        "type": "accountAttribute"
                    },
                    {
                        "attributes": {
                            "value": "NONE"
                        },
                        "type": "static"
                    }
                ]
            },
            "type": "firstValid"
        },
        "value": "#if($OUCheck.contains(\"OU=Users\"))YES#{else}NO#end"
    },
    "internal": false
}

“ou”: {
“type”: “firstValid”,
“attributes”: {
“values”: [
{
“type”: “split”,
“attributes”: {
“input”: {
“type”: “accountAttribute”,
“attributes”: {
“attributeName”: “distinguishedName”,
“sourceName”: “Active Directory”
}
},
“delimiter”: “,”,
“index”: 2
}
},
“No AD Account”
]
}

This worked for me