MS365DefenderAddComment
Use this script to add a comment to a Microsoft 365 Defender incident. To be run within the incident.
python · Microsoft 365 Defender
Details
| ID | MS365DefenderAddComment |
|---|---|
| Language | python |
| From Version | 6.10.0 |
| Docker Image | demisto/crypto:1.0.0.10120494 |
| Tags | Microsoft 365 Defender |
def test_add_comment(mocker): from MS365DefenderAddComment import add_comment, demisto mocker.patch.object(demisto, "executeCommand") add_comment({"id": "1", "comment": "test"}) assert demisto.executeCommand.call_count == 1 assert demisto.executeCommand.call_args[0][0] == "microsoft-365-defender-incident-update" assert demisto.executeCommand.call_args[0][1]["id"] == "1" assert demisto.executeCommand.call_args[0][1]["comment"] == "test"