Dharani_01
(Bhavadharani Arulsivaraman)
April 10, 2024, 5:35pm
1
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”
},
ipobeidi
(Ivan Obeidi)
April 10, 2024, 6:31pm
2
hey @Dharani_01 , i didn’t quite understand what you asking, or your use case, can you elaborate a little bit?
Best
kjakubiak
(Kamil Jakubiak)
April 10, 2024, 8:17pm
3
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"
}
}
jesvin90
(Jesvin Joseph)
April 11, 2024, 3:58am
4
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
}
Dharani_01
(Bhavadharani Arulsivaraman)
April 18, 2024, 1:16pm
5
“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
system
(system)
Closed
June 17, 2024, 1:17pm
6
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.