Custom web action command
Overview
Custom web actions run unsupported custom scripts for Active Directory or Microsoft 365 objects selected in the Cayosoft AdministratorWeb Portal.
Video tutorial
Create custom web action
- In the Cayosoft Administrator console, enable the Design Mode—navigate to Configuration > Support > Design Mode, and click Enable Editing in Design Mode.
In the Cayosoft Administrator console, click + New > Custom Web Action.
Specify a name for the custom web action. The name is displayed both in the Web Actions node of the Cayosoft Administrator console and the Actions pane of the Web Portal.
Optional: Specify a description. The description is displayed in the Web Actions node of the Cayosoft Administrator console.
-
Define the Enable command setting:
Select the Always option to have the web action always enabled, even when no object is selected.
Select the When a single object is selected option to have the web action enabled when an object is selected.
Click OK to create the web action.
A custom web action is created under the Configuration > Web Portal > Web Actions > Common node.
Add custom action to web query
Link the created custom web action to a web query to update the corresponding objects. Refer to the following article for additional information: How to add, remove or re-arrange Web actions within a Web Query.
Get output in custom web action
Use the Write-Host or Write-Error command in the script to generate the output of the custom web action. The output is prompted in the execution report of the web action and the Details section of the Results dialog in the Web Portal.
Web action settings
Action section
Setting name |
Description |
|---|---|
Script file |
Specify a PowerShell script file to execute. The script is executed every time you run the web action. NOTE: By default, the script runs using the Local System account. If your script is designed to access network resources, interact with AD, etc., specify the AD account credentials in the script. Alternatively, you can use the $AD_Credentials variable in the script to utilize the default Active Directory extension credentials you specified in the Active Directory extension settings. |
Header tooltip |
Specify the text displayed after you click the custom web action. |
Script parameters |
NOTE: The first line of the script must list the parameters used in the script. The parameters without the $ sign must be specified in the corresponding Selected object DN, Selected object ID, and Initiator SIDsettings. For example: |
Selected object DN |
Specify the parameter in the script. The distinguished name of the object selected in the Web Portal is assigned to the specified parameter. The setting applies only to the Active Directory objects. |
Selected object ID |
Specify the parameter in the script. The NOTE: When an Entra ID object is selected, the |
Initiator SID |
Specify the parameter in the script. Depending on the platform, the following parameter of the user account running the web action is assigned:
TIP: The automatic SSO for Entra ID / Microsoft 365 authentication method is required to enable Entra users to log in the Cayosoft AdministratorWeb Portal. For additional information on available user sign-in options, refer to the following article: Web Portal settings. |
Custom Parameters | |
Custom parameter 1−20 |
Copy the parameter name from the script to the corresponding custom parameter. Use the appropriate Attribute Policy to set labels, default values, or drop-down list selections. |
More options | |
Additional script parameters |
Specify the additional script parameters, if needed. |
Initialization script |
Specify the initialization script, if needed. |
Use separate process |
Set up the web action to run the script using a separate process. If your script is using any PowerShell modules or calling any external APIs, it is strongly recommended to use a separate process. Set up the script to run within the main Cayosoft Administrator Service process if the script only reads and writes data to Cayosoft Administrator and does not perform any external API calls. If you plan to use script parameters and output, keep the Use separate process value to No. In this case the script would run under the LocalSystem account or the account used to run the Cayosoft Administrator Service. IMPORTANT: To utilize script parameters and get the script output, keep the No value. |
| Write change history | Specify whether to log the custom web action activity using the Change History web action. |
Show ticket input field |
Controls the Ticket# field visibility. The field is not visible by default. |
Show comment input field |
Controls the Comment field visibility. The field is visible by default. |
Output section
This section defines the output format of this rule.
To get more information about this section, please see the Rule Output section article.
Comments
0 comments
Please sign in to leave a comment.