0

I have Azure Storage with Windows Defender. When a file/component uploads with malware we have alerts in the Azure Security Center. I use Azure REST API to read and process that malware automatically. We have a custom workflow to process them. At the end of the processing, we want to remove the alert so that in the future we do not get them.

I use List By Resource Group to list out the alerts. I am using the Update Resource Group Level Alert State To Dismiss to change the state of the alert.

To call the API to update the status of the alert, I am forming the POST URL as follows. I took the highlighted part from the List REST call as shown in the picture.

enter image description here

Then I add the following before and after that.

https://management.azure.com<the id value from the above>/dismiss?api-version=2020-01-01

I then make a POST request to that URL using a .Net Core 3.1 application (using the HttpClient.PostAsync from system.net.http namespace). What I am receiving is a 400 HTTP status code with "UnsupportedResourceOperation" in the body as an error code. The full response body is showing below:

enter image description here

The error message seems misleading. I find this answer Dismiss Security Center Alert using Graph API suggesting the same approach that I am following. I am not sure what I am doing wrong. My AD tenant app has a subscription contributor role.

Any help will be appreciated.

Md Monjur Ul Hasan
  • 1,705
  • 1
  • 13
  • 36

1 Answers1

0

Sorry for the late response, We found a bug on our side and managed to fix it, can you please try and see whether this works now?

Zahi Abow
  • 49
  • 7