Forum Discussion
Pranesh1060
Feb 28, 2020Copper Contributor
Unable to update the alert in Security Graph using HTTP connector
Hi,
We are trying to get requests for security alerts using the http connector available in Logic apps. We are querying the Graph Explorer API using the GET method and we are able to get the requested results. However when we try to update the alert using the PATCH method, by changing some values like assigned to, comments, tags, vendor information etc and run the trigger it fails with one message:
message": "Request body has invalid content for property closedDateTime". As far as closedDateTime is concerned we tried with utcNow(), utcNow('D') but it fails. Did anyone here manage to update the alerts without errors? Any leads wrt to this will really be helpful.
2 Replies
Sort By
- Nicholas DiCola (SECURITY JEDI)Former Employee
Hi Pranesh1060
did you enclose the date in "?
utcnow() will give you the right format, but as you can see here https://docs.microsoft.com/en-us/graph/api/alert-update?view=graph-rest-1.0&tabs=http#request-1
{ "assignedTo": "String", "closedDateTime": "String (timestamp)", "comments": [ "String" ], "feedback": "@odata.type: microsoft.graph.alertFeedback", "status": "@odata.type: microsoft.graph.alertStatus", "tags": [ "String" ], "vendorInformation": { "provider": "String", "vendor": "String" } }
the body needs to have closedDateTime in "" so its a string
- Pranesh1060Copper Contributor
@ Nicholas DiCola (SECURITY JEDI)Well I haven't as I am not sure the exact parameter to use. Would date be today's date? When the playbook is triggered how can we automatically add the date?