logo
search
SharePoint Document Issues

Fix SharePoint Server 2019 Workflow History and Approved Items Deletion

Aamir Naveed AkramAamir Naveed Akram Sep 29, 2026 868 views

Question details

Completed workflow instances and approval history in SharePoint Server 2019 are disappearing automatically after several days, leaving the workflow status blank.

How to Fix SharePoint Server 2019 Workflow History Deletion
Product
SharePoint Server 2019
Device & OS
not provided
Scenario
Managing document approvals and maintaining permanent audit records of workflow histories in a SharePoint on-premises environment.
Observed behavior
Completed workflow instances and their associated approval history are automatically deleted from the system, usually by a timer job, causing the workflow status to become blank.
Before you start

Ensure you have SharePoint Farm Administrator privileges or sufficient permissions to access the SharePoint server and run SharePoint Management Shell (PowerShell) commands.

Solution 1Recommended

Increase the Workflow AutoCleanupDays via PowerShell

Modify the default retention period for a specific workflow association using SharePoint PowerShell to prevent premature deletion.

SharePoint uses a Workflow Auto Cleanup timer job that automatically removes completed workflow data after a default 60-day retention period. You can extend this duration for specific workflow associations rather than disabling the cleanup job globally.

1
Open SharePoint Management Shell

Log in to your SharePoint Server as an Administrator and launch the SharePoint Management Shell.

2
Target the specific web and list

Run the command to store your site and list in variables, for example: $web = Get-SPWeb 'http://yoursharepointsite' and $list = $web.Lists['YourListName'].

3
Update the AutoCleanupDays property

Identify the workflow association and change its cleanup threshold. For example: $list.WorkflowAssociations[0].AutoCleanupDays = 365.

4
Save the changes

Commit the changes by executing $list.WorkflowAssociations[0].Update(). The workflow history will now be retained for the specified number of days.

Increase the Workflow AutoCleanupDays via PowerShell
Performance consideration: Setting this value extremely high (e.g., thousands of days) can cause the workflow history list to exceed the list view threshold over time, which may degrade site performance.
Free Microsoft Office alternative

Looking for a simpler way to manage office documents? Try WPS Office

While resolving Microsoft SharePoint server settings requires IT administration and complex PowerShell scripts, managing your everyday office documents should be effortless. WPS Office provides a lightweight, highly compatible alternative to Microsoft Office for creating, editing, and sharing documents locally or via the cloud without complex retention policies.

  1. 1. Download WPS Office: Visit the official WPS website and download the free installer for your specific operating system.
  2. 2. Install the software: Run the setup file and follow the on-screen instructions to install WPS Office on your device.
  3. 3. Manage your documents securely: Create, save, and organize your documents locally or sync them to WPS Cloud to ensure your files are permanently retained and easily accessible.
Free and lightweight office suite for all your document needsFully compatible with Microsoft Word, Excel, and PowerPoint formatsBuilt-in cloud storage for easy document backup and sharing without complex auto-cleanup jobsFamiliar user interface for a seamless migration experienceCross-platform support across Windows, Mac, Linux, iOS, and Android
microsoft office alternative - wps office

Frequently Asked Questions

Why does SharePoint delete workflow history by default?

The Workflow Auto Cleanup timer job is designed to delete completed workflow instances and their associated history tasks automatically (typically after 60 days). This prevents the hidden Workflow History list from growing too large, which would eventually impact the performance of the entire SharePoint site collection.

Can I completely disable the Workflow Auto Cleanup timer job?

While you can disable the timer job in SharePoint Central Administration, it is highly discouraged by Microsoft. Disabling it applies globally across the web application and will eventually lead to severe performance degradation due to unbounded list growth in the workflow history lists.

Does changing the AutoCleanupDays affect currently running workflows?

No. The AutoCleanupDays retention period only applies to workflows that have reached a 'Completed' or 'Cancelled' state. Active, running workflows are ignored by the Auto Cleanup timer job regardless of how long they have been running.

How can I view the workflow history before it gets deleted?

You can view the workflow history of an item by navigating to the specific SharePoint list or document library, selecting the item, clicking on 'Workflows' in the ribbon or context menu, and then clicking on the name of the completed workflow instance.