Purge Assessment Data in Log Analytics

Deletes in Log Analytics are destructive and non-reversible! Please use extreme caution in their execution.

If you are seeing data from previous runs of the assessment that you want to delete in the Log Analytics, we recommend to use below solution.

  1. First we need to have Data Purger role to perform this activity. Refer to this aricle regarding Adding Role Assignments to get the Data Purger role assignment.

  1. Review the policies and process to purge data here.

  2. Click the Try It button here

4. After successful sign with user account having **Data Purger** role, fill the Parameters (subscriptionId, resourceGroupName and workspaceName) highlighted in GREEN box.

  1. Update the Request Body to specify filters to be applied while purging the data.

Code present in the Body parameter above will Purge all data generated after "2019-05-06T00:00:00" from "ADAssessmentRecommendation" table.

{ "table": "ADAssessmentRecommendation", "filters": [ { "column": "TimeGenerated", "operator": ">", "value": "2019-05-06T00:00:00" } ] }

A list of all the tables name like ADAssessmentRecommendation can be found in your Log Analytics workspace in the Logs tab.

6. After filling all details as mentioned above, click the **Run** button present at bottom of the screen.

  1. If we get Response code as 202 and we get operation id back, we are good and data will be purged soon.


In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch the execution of purge requests by sending a single command whose predicate includes all user identities that require purging. Use the in operator to specify multiple identities. You should run the query before executing the purge request to verify that the results are expected.

If you face any issues while performing this activity, feel free to create a support ticket in the Azure Portal.

For general feedback on the Resource Center or content, please submit your feedback to your Microsoft representative. For specific requests and content updates regarding the Services Hub, contact our Support Team to submit a case.