0 votes

I am attempting to block changing of SAM Account Name through a business rule.

image.png

When attempting to do a rename in the portal, changing the SAM Account Name is offered at the same time, and despite not changing it the business rule is triggered.

image.png

Thoughts?

by (160 points)

1 Answer

0 votes
by (294k points)

Hello Daniel,

Such a behavior can only occur if option on creating and editing objects is enabled for SAM Account Name in your property pattern settings. image.png In this case, when the related properties are updated, the SAM Account Name one is also considered as updated even when the new value is the same as the old one. The behavior is by design and cannot be changed. To achieve the desired, add the following script as condition (If PowerShell script returns true) to your business rule.

$sAMAccountName = $Context.TargetObject.Get("sAMAccountName")
$Context.ConditionIsMet = $sAMAccountName -ne "%sAMAccountName%"

Related questions

0 votes
0 answers

When the UPN being created is the same as an existing one except for the case. For instance, the new UPN is sally.fields but there's an existing Sally.Fields. The ... but then fails to create the AD account indicating that the UPN is not unique forestwide.

asked Jul 13, 2022 by sandramnc (870 points)
0 votes
1 answer

Using the powershell module, I know how to create a scheduled task, and also how to bind to a scheduled task that is already known. I also have used code to try creating ... same time as another. These are all one-time tasks and will be removed once executed.

asked Jan 19 by aweight (60 points)
0 votes
1 answer

If the user name submitted is "jhon doe" all of the users properties will be lower case. We want it to force it to be "Jhon Doe" even if it was submitted in lower case.

asked Aug 31, 2022 by raul.ramirez (210 points)
0 votes
1 answer

How do change the display name of a custom attribute in version 2017.2? All the information I am finding contains links that bring me to 2018 version

asked Nov 1, 2018 by hgletifer (1.3k points)
3,589 questions
3,278 answers
8,303 comments
548,133 users