0 votes

We have business rule attached to "adding member to a group" which tuns powershell script and it was working fine. But (probably after the update to newest 2023 version) script that is being run throws errors, because %member% variable is empty for some reason. So the line with $context.BindToObject("Adaxes://%member%") fails.

I've added output of the %member% variable to the script: image.png And here you can see the error and that the %member% is clearly empty: image.png

How can I fix this please?

by (960 points)

1 Answer

0 votes
by (216k points)
selected by
Best answer

Hello,

The PowerShell script executed in the business rule and the rule itself are correct. The error occurs due to an issue in Adaxes 2023. It will be fixed in one of the future releases. We apologize for the inconvenience.

As a workaround for now, you need to make sure that the business rule does not trigger for rule-based groups. To achieve that, the business rule should look like the following: image.png

Related questions

0 votes
1 answer

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?

asked Oct 9, 2023 by jnordell (20 points)
0 votes
1 answer

We were used to bind to group member object using: $member = $Context.BindToObjectByDN("%member%") which worked perfectly, but now it is not. Its because %member% is returning ... ? And is it possible to get DN of added/removed member using another variable?

asked Sep 14, 2020 by KIT (960 points)
0 votes
1 answer

We are attempting to use the member property in a powershell script for all groups. We get this error message on certain groups that are used as "primary". If we set another ... just shows the single member in the group in which the group is not the primary.

asked Feb 19, 2020 by mark.it.admin (2.3k points)
0 votes
1 answer

I need a way of triggering a business rule based on the user (and not the group) being added or removed from a group. The reason I would like this triggered on the user is so ... prefer not to do that. I am checking to see if there is another way to do this.

asked May 16, 2023 by mark.it.admin (2.3k points)
0 votes
1 answer

I have created a Business Rule (call it BR1) that occurs After adding or removing a member from a group . For testing purposes, it currently runs a PowerShell script ... the Business Rule I created. Is this expected behavior? Or am I doing something wrong?

asked Apr 12, 2023 by alex.vanderwoude (60 points)
3,549 questions
3,240 answers
8,232 comments
547,814 users