AssignToMeButton
Assigns the current Incident to the Cortex XSOAR user who clicked the button.
- Type
- python
- Pack
- CommonScripts
Source
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}!")
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.