Source PowerShell systems, target PowerShell systems, and target Active Directory systems support the Custom connector configuration option. This lets you store input parameters needed in the various PowerShell scripts associated with the system, such as API keys and secrets, passwords, URLs, etc. It accomplishes this by letting you define a UI form in which you can enter the parameter values. You then receive them inside a
$configuration JSON string in your PowerShell scripts.
This feature lets you change your input parameters more easily than when they are hard-coded into your scripts. Additionally, moving parameters out of your scripts lets you more freely share them without leaking sensitive information.
This feature is powered by Formly.
Custom connector configuration
To get started, go to the Custom connector configuration option on the System tab (for source PowerShell systems):
Or, the Custom connector configuration option on the Account tab (for target PowerShell systems):
Or, the Custom PowerShell configuration option on the Account tab (for target Active Directory systems):
Select the wrench icon to open the form JSON editor:
By default, the JSON editor contains boilerplate examples for each type of supported form element (required text, multi-line text, password, email, toggle, radio button, and drop down menu). Customize these as needed for your PowerShell scripts. Note that a dot (
.) in a key value makes it a sub-object. This is useful if you're working with credentials from multiple systems at the same time.
You can preview the resulting JSON string in the Result area. Each value is identified by its
After you've defined a form in JSON, the source or target system's Configuration tab becomes available, containing your new form:
Here, enter the actual values that you wish to pass into your PowerShell scripts, and select the Apply button.
To use these parameters, go to the System tab (for source PowerShell systems) where your Persons and Departments PowerShell scripts are located. Or, go to the Account tab (for target PowerShell systems and target Active Directory systems), where your user account lifecycle and post-action PowerShell scripts are located.
In these scripts, you now have access to the
$configuration JSON string. Convert it to a PowerShell object with
$config = ConvertFrom-Json $configuration, and then access
$config's properties via their respective
key values as defined in the form's JSON.