Details
| ID | MS365DefenderUserListToTable |
|---|---|
| Language | python |
| From Version | 5.5.0 |
| Docker Image | demisto/python3:3.12.13.10404775 |
| Tags | transformer |
README
Script Data
| Name | Description |
|---|---|
| Script Type | python3 |
| Tags | transformer |
| Cortex XSOAR Version | 5.5.0 |
Inputs
| Argument Name | Description |
|---|---|
| value | list of users |
Outputs
There are no outputs for this script.
def test_count_dict_multiple_users(): """ Given: - A comma-separated string of multiple users. When: - Running the MS365DefenderUserListToTable transformer. Then: - Ensure every user is returned as its own row (not collapsed into a single row). """ from MS365DefenderUserListToTable import count_dict input_value = "username@domain (BOQDEVUSER.LOCAL),admin@contoso.com (CONTOSO)" expected_output = [ {"User": "username@domain (BOQDEVUSER.LOCAL)"}, {"User": "admin@contoso.com (CONTOSO)"}, ] assert count_dict(input_value) == expected_output def test_count_dict_single_user(): """ Given: - A single user string. When: - Running the MS365DefenderUserListToTable transformer. Then: - Ensure a single row is returned. """ from MS365DefenderUserListToTable import count_dict assert count_dict("username@domain (BOQDEVUSER.LOCAL)") == [{"User": "username@domain (BOQDEVUSER.LOCAL)"}] def test_count_dict_non_string_passthrough(): """ Given: - A non-string value. When: - Running the MS365DefenderUserListToTable transformer. Then: - Ensure the value is returned unchanged. """ from MS365DefenderUserListToTable import count_dict value = [{"User": "already-a-table"}] assert count_dict(value) == value