In this case the working example would be that the user would need to add a new title into a list of titles in the title property pattern
Hello,
Unfortunately, there is no such possibility in any Web interface unless using scripts. There is built-in functionality for managing property patterns only in the Administration console.
A script is fine by me. Can you point me to the relevant script to accomplish this?
I already have a script that takes a property pattern list and copies it to a parameter list. I assume it would be similar but in reverse?
Thank you
Have a look at the following script from our repository: https://www.adaxes.com/script-repository/add-new-allowed-property-value-to-a-property-pattern-s585.htm.
Works like a charm.
Can this script be reworked to remove a value as well? Implemented as a separate custom command/script?
Here is the updated script.
$propertyName = "company" # TODO: modify me $propertyPatternDN = "CN=My Pattern,CN=Property Patterns,CN=Configuration Objects,CN=Adaxes Configuration,CN=Adaxes" # TODO: modify me $parameterName = "param-Value" # TODO: modify me # Get parameter value $parameterValue = $Context.GetParameterValue($parameterName) # Bind to the Property Pattern $userPattern = $Context.BindToObject("Adaxes://$propertyPatternDN") $values = New-Object System.Collections.ArrayList $isPropertyRequired = $False foreach ($item in $userPattern.Items) { if ($item.PropertyName -ne $propertyName) { continue } $constraints = $item.GetConstraints() $constraint = $constraints.GetConstraint("ADM_PROPERTYCONSTRAINTCATEGORY_VALUEFORMAT") # Check if new value exists if ($constraint.Values -notcontains $parameterValue) { return } # Get current values $constraint.Values | %%{[void]$values.Add($_)} $isPropertyRequired = $item.IsPropertyRequired # Remove Property Pattern item $userPattern.Items.Remove($item) break } # Add new value [void]$values.Remove($parameterValue) # Sort values $values.Sort() # Update Property Pattern $item = $userPattern.Items.Create() $item.PropertyName = $propertyName $item.IsPropertyRequired = $isPropertyRequired $constraints = $item.GetConstraints() $constraint = $constraints.Create("ADM_PROPERTYCONSTRAINTTYPE_VALUERANGE") $constraint.AreValuesDenied = $False $constraint.Values = $values.ToArray() $constraints.Add($constraint) $item.SetConstraints($constraints) # Save the changes $item.SetInfo() $userPattern.Items.Add($item)
Thank you, both scripts work perfectly.
A little bit of context: There are 3 departments that share 1 Active Directory. Now each department has its own OU. I would like to have an email sent when a user is ... if this is possible without Powershell? If not, is there a pre-existing script for this?
The use case we are looking for is providing a list of titles for users to choose from when initiating a re-hire. We already have a title property pattern established and would ... that we can manage the list in one place. Let me know and as always, thanks.
In order to add a managed domain does it have to be trusted by the primary domain adaxes is installed an running in? I have set up a domain for testing adaxes and it ... I have set my host file to point the untrusted domain to it's primary Domain Controller.
Automation of user creation based on ServiceNow ticket creation.
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?