Overview
Starting from the 9.1.0 version a new Custom Web Action command has been added. This web action allows running unsupported custom scripts for Active Directory or Microsoft 365 objects that are selected in the Cayosoft Web Portal.
Video tutorial
How to create a Custom Web Action command
- In the Administrator Console click + New.
- Select Custom Web Action.
- Specify its Name - that is how it will be displayed in the Actions menu in the Web Portal.
- Specify Description if needed.
- Select if this Custom Web Action will be always enabled in the Web Portal or only when a single object is selected.
- Click Ok.
Custom Web Action will be created in Home > Configuration > Web Portal > Web Actions > Common.
How to add a custom action to a Web Query
You should link the created Custom Web Action to a web query that objects this action will be updated.
For details please see How to add, remove, or re-arrange Web actions within a Web Query – Cayosoft Help Center.
How to get a result of Custom Web Action
To get the result of Custom Web Action in the execution history or in the result dialog in the Web Portal you can use write-host\write-error commands in the script.
Custom Web Action settings
Action Section
Setting name |
Description |
---|---|
Script File |
Select the PowerShell script file that Custom Web Action will execute. Note: If Administrator Service is running as a Local System you should specify AD connection account credentials in the script. Otherwise, you can use the $AD_Credentials variable in the script. This variable has Active Directory default credentials specified in the Active Directory extension.
|
Header tooltip |
You can specify the text that will be displayed on the Custom Web Action form. |
Script Parameters
|
|
Note: The first line of the script should always have a list of parameters that are used in the script. The corresponding parameters from the script should be specified in Selected object DN, Selected object ID, and Initiator SID settings but without '$'.
For example: param ($ObjectID)
#This is a test script
Set-ADUser $ObjectID -Replace @{mail="glenjohn@fabrikam.com"} -Server "dc.fabrikam.com" -Credential $AD_Credentials
|
|
Selected object DN |
The DN of the object selected in the Web Portal will be passed to the specified parameter in the script. This value exists only for AD objects. |
Selected object ID |
The ID of the object selected in the Web Portal will be passed to the specified parameter in the script. For AD objects, the ObjectGUID property value will be passed. For Azure AD objects, the ID property value will be passed. |
Initiator SID |
The initiator SID (user account that executes the action) will be passed to the specified parameter when this action is executed. If an on-premises user makes the change, user SID is used, but if an Azure user makes the change, user AzureID is used.
|
Custom Parameters |
|
Custom parameter 1 ... Custom parameter 20 |
Copy the parameter name from the script to the corresponding custom parameter. To set labels, default values, or drop-down list selections, please use the appropriate Attribute Policy. |
More Options |
|
Additional script parameters |
Specify additional script parameters if needed. |
Initialization script |
Specify the initialization script if needed. |
Use separate process |
Specify whether to run the script in a separate process. Note: Script parameters and script output can be used only within the same process.
|
Show ticket input field |
Specify whether to display the Ticket field on the web form or not. By default, the ticket is not displayed. |
Show comment input field |
Specify whether to display the Comment field on the web form or not. By default, the comment is displayed. |
Change History
Version | Notes |
---|---|
9.1.0 |
The action has been introduced in the product. |
Comments
0 comments
Please sign in to leave a comment.