Fix Power Automate and SharePoint System Account Deleting Excel Files
Question details
Users experience unintended deletion of SharePoint files by the System Account when a Power Automate flow attempts to add data to an Excel file.

- Product
- SharePoint, Power Automate, Microsoft Excel
- Device & OS
- not provided
- Scenario
- Using automated Power Automate flows to update Excel files stored within a SharePoint document library.
- Observed behavior
- The SharePoint System Account automatically deletes the Excel file being modified by the flow, often due to misconfigured permissions, retention policies, or flow error-handling actions.
Before troubleshooting, check the SharePoint Site Recycle Bin to recover the deleted Excel file and create a local backup copy to prevent permanent data loss during your testing.
Audit Power Automate Flow and Connection Permissions
Verify that the flow does not contain hidden delete actions and that the connection account has the correct SharePoint permissions.
In many cases, flows contain built-in error-handling blocks or conditions that might inadvertently trigger a 'Delete file' action when an Excel file update fails.
Open Microsoft Power Automate, locate the flow causing the issue, and click 'Edit' from the top menu.
Examine all steps, particularly conditional branches and error-handling blocks, ensuring there are no 'Delete file' actions inadvertently triggered during an Excel data update.
Navigate to 'Data' > 'Connections' in the left sidebar to verify the account used for the SharePoint connection. Ensure this account has 'Contribute' or 'Edit' permissions on the target SharePoint document library.

Inspect SharePoint Retention Policies and Audit Logs
Identify if a background SharePoint policy or automated file-protection rule is intentionally deleting the modified Excel files.
Try WPS Office for Seamless Spreadsheet Management
If you are frustrated with complex Microsoft Office syncing errors and restrictive SharePoint constraints, WPS Office offers a free, lightweight, and highly compatible alternative. Enjoy seamless local and cloud spreadsheet editing without dealing with unexpected background deletion flows.
- 1. Download WPS Office: Visit the official WPS website and download the free WPS Office suite for your device.
- 2. Install and Launch: Follow the simple installation wizard and open WPS Spreadsheets.
- 3. Edit Your Excel Files: Open your .xlsx files directly to enjoy perfect format compatibility and secure local editing.

Frequently Asked Questions
Why does the SharePoint System Account delete files instead of my user account?
The 'System Account' usually appears in logs when automated background processes trigger a deletion. This includes organizational retention policies, compliance rules, or Power Automate flows utilizing elevated system connections rather than standard user credentials.
How can I recover an Excel file deleted by Power Automate?
Navigate to your SharePoint site, click on 'Recycle Bin' in the site contents or left navigation menu, select the deleted Excel file, and click 'Restore' at the top of the page.
Can a locked Excel file cause Power Automate to delete the file?
A file lock typically causes a flow to fail with an error rather than actively deleting the file. However, if your flow has poorly configured error-handling conditions, a locked file failure might accidentally trigger a secondary delete action.




