Hi,
we use the rule "Before adding a user to group" for approval workflow on the groups OU. How can we skip this rule if the added user is located under a special OU? The added user is not the initiator. We use Win 2008 R2 and Adaxes 2012.1 latest fix-release.
Regards
Hello,
You can use the If PowerShell script returns true condition:
Right-click the Send operation for approval action and click Add Condition in the context menu.
Select the If PowerShell script returns true condition in the list.
Paste the following script to the Script edit box.
$Context.ConditionIsMet = $True $OUDN = "OU=Sales,DC=company,DC=com" # TODO: modify me $newMember = $Context.BindToObjectByDN("%member%") $memberOUPath = New-Object "Softerra.Adaxes.Adsi.AdsPath" $newMember.Parent if ($memberOUPath.DN -ieq $OUDN) { $Context.ConditionIsMet = $False }
Modify the script: set the distinguished name (DN) of your Organizational Unit to the variable called $OUDN. To get the DN of an Organizational Unit:
Hello Eugene,
Thank you very much. It works! The
$newMember = $Context.BindToObjectByDN("%member%")
was the missing twist. ;)
Let's say I have a Business Rule that is fired prior to adding members to a group. Is it possible to get the number of objects being added to that group as ... that tells me that 6 objects will be added or is each added user treated completely independently?
Hi team, I have a follow up to this question https://www.adaxes.com/questions/14234/business-after-adding-members-powershell-script-executed Let me explain my setup A rule- ... area% failed due to the following exception: $($_.Exception.Message)", "Error") }
Hi, I have a business rule setup to perform actions after user creation. First action is to run a powershell script which works and it sets a required AD attribute ( ... new user sits in the original OU and does not move Am i missing something here?
Hi, I need to retreive a secret from a Azure Keyvault in a business rule. I have a powershell script that works if i run a external command. But it fails if ... at <ScriptBlock>, <No file>: line 20 Any sugestion? Kind regards Reidar Dick-Henriksen
I am trying to trigger processing outside of Active Directory when an account is created based on the source user account that was used. Does Adaxes store the source account anywhere?