AssignToMeButton
Assigns the current Incident to the Cortex XSOAR user who clicked the button.
python · Common Scripts
Details
| ID | AssignToMeButton |
|---|---|
| Language | python |
| From Version | 5.0.0 |
| Docker Image | demisto/python3:3.12.13.10404775 |
| Tags | incident-action-button |
README
Assigns the current Incident to the Cortex XSOAR user who clicked the button
Script Data
| Name | Description |
|---|---|
| Script Type | python3 |
| Tags | incident-action-button |
| Cortex XSOAR Version | 5.0.0 |
Inputs
There are no inputs for this script.
Outputs
There are no outputs for this script.
import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 # get incident id incident_id = demisto.incidents()[0].get("id") # get demisto user user = demisto.executeCommand("getUsers", {"current": True}) username = user[0].get("Contents")[0].get("username") # set the Incident Owner demisto.executeCommand("setOwner", {"owner": username}) demisto.results(f"This one is all yours {username}!")