What happens to the runtime data when a tenant is being deleted

Hi Camunda community :waving_hand:

I was trying to find out what happens to a tenant’s data after the tenant is deleted in Camunda 8. I couldn’t find anything explicit in the docs about the lifecycle of data tied to that tenant.

Docs I’m referring to: Tenants | Camunda 8 Docs

What I’m wondering:

  • After deleting a tenant, what happens to:

    • currently running process instances that were started under that tenant?

    • historic data / “completed” instances (history, etc.) associated with that tenant?

  • Is any data actually deleted, or is it simply no longer visible in the tools because the tenant can’t be selected / doesn’t match tenant filters anymore?

  • If it’s not deleted:

    • does the data remain queryable via API in any form?

    • is there an official cleanup / retention mechanism recommended for this scenario?

My current assumption (but I’m not sure):

Deleting a tenant removes the tenant entity from Identity, but does not cascade-delete related runtime/historic records. Instead, the data remains in the underlying stores, but becomes effectively “orphaned” and no longer shows up in tools due to tenant-based filtering.

If someone could clarify the intended behavior, that’d be super helpful.

Thanks! :slight_smile:

Thomas

Hi Thomas! :waving_hand:

Great question about tenant data lifecycle in Camunda 8. I can see you’ve done your homework by checking the documentation first.

Classification: This is a General Question about tenant data management behavior.

Based on the available documentation, your assumption appears to be correct. Here’s what I found:

What the Documentation Says

The documentation confirms that:

What Happens to the Data

The documentation does not explicitly state what happens to tenant-specific data when a tenant is deleted, but based on how data retention works in Camunda 8:

Your assumption is likely correct:

  • Deleting a tenant removes the tenant entity from Identity
  • Runtime and historic data remains in the underlying stores (Zeebe, Elasticsearch/OpenSearch)
  • The data becomes “orphaned” and no longer shows up in tools due to tenant-based filtering
  • No automatic cascade deletion occurs

Data Cleanup Behavior

Data retention in Camunda 8 is time-based, not tenant-based:

For SaaS:

  • Data retention periods are fixed (Operate: 30 days, Tasklist: 30 days, Optimize: 180 days, Zeebe: 7 days)
  • These are time-based and don’t change when a tenant is deleted

For Self-Managed:

Recommendations

Since this behavior isn’t explicitly documented:

For SaaS: Contact Camunda support to get official clarification and discuss tenant-level data cleanup if needed for compliance reasons.

For Self-Managed: You would need to implement your own tenant-scoped deletion in your data stores if you require immediate cleanup of deleted tenant data.

API Queryability

The orphaned data would likely remain queryable via direct API calls to the underlying services, but would not appear in the UI tools due to tenant filtering.

This is definitely a documentation gap that should be addressed. Would you like me to help you file a documentation improvement request, or do you need clarification on any specific aspect of this behavior?