# Authorization not fully cleaned up after history deletion

**URL:** <https://forum.camunda.io/t/authorization-not-fully-cleaned-up-after-history-deletion/58124>\
**Category:** Discussion & Questions\
**Tags:** process-engine, camunda-7\
**Created:** [December 17, 2024, 6:29pm UTC](https://forum.camunda.io/t/authorization-not-fully-cleaned-up-after-history-deletion/58124 "2024-12-17T18:29:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MattiaFattorello](https://forum.camunda.io/user_avatar/forum.camunda.io/mattiafattorello/32/31678_2.png) [@MattiaFattorello](https://forum.camunda.io/u/MattiaFattorello)\
**Post date:** [December 17, 2024, 6:29pm UTC](https://forum.camunda.io/t/authorization-not-fully-cleaned-up-after-history-deletion/58124/1 "2024-12-17T18:29:40Z")

</div>

Hi,  
I’m checking the deletion of history process instances in camunda 7.22 (and 7.18) and I found this suspicious orphans row in the authorization table and I’m not sure if it is a bug.

1. I record the authorizations in a temp table.
2. I start a process-instance, complete a couple of tasks, then delete the process-instance.
3. I use POST /history/process-instance/delete to delete the history of the process.
4. If I check what rows have been left In the authorization table I find those for the history tasks that have been created for the process, but the history tasks have already been deleted.

Is there a reason I don’t see for why these records are kept?

Thanks
