Hi Pierre
The SOAR documentation at this point unfortunately is incomplete.
Even the TaskDTO documentation (https://resilient.localdomain/docs/rest-api/json_TaskDTO.html) provides absolutely no information or any useful information about task privacy.
That said, the way to make a task private is to assign members to it.
When a task has members assigned, it automatically changes its state to "private"
So your script must have something like this
task.members = ['
abc@br.ibm.com', '
xyz@ibm.com']
instead of
task.private = True
Also, I am afraid task.private receives a value that is an object, not a boolean, but I have absolutely no idea how this object looks like because the documentation simply does not provide any info about this. However, setting the task members will do the trick.
I hope it helps.
------------------------------
[]
Leonardo Kenji Shikida
------------------------------
Original Message:
Sent: Mon June 27, 2022 03:49 PM
From: Pierre Dufresne
Subject: Making a task private from a script
Hi
I created a very simple playbook for a task object which is activated when the task is created and is of a specific name.
The playbook only consists of one script to assign the task to a specific group and mark the task as private.
The script only as 2 lines:
task.owner_id = "Some group"
task.private=True
When I look at the task Members tab after the playbook has executed, the task is still in a public state, ie I see the field "Mark task private" with the value Off.
I thought the private field would be a boolean field but this not seems to be the case.
How can I make a task private using a script?
Thank you for your help.
------------------------------
Pierre Dufresne
------------------------------