Free up storage space

You can reduce the amount of storage space used by removing or deleting information from dynamics 365 apps, such as:

  • Dynamics 365 Sales
  • Dynamics 365 Customer Service
  • Dynamics 365 Field Service
  • Dynamics 365 Marketing
  • Dynamics 365 Project Service Automation
  • Dynamics 365 Finance and Operations

This article gives you 15 methods to better manage storage.

Use one or more of these methods to control your total data storage usage. You can delete categories of data as the need arises or set up bulk deletion jobs to reoccur at set intervals. For example, you can delete notes, attachments, import history, and other data.

Warning

You can't restore your data once it's deleted. You might want to increase the amount of storage space in your Microsoft Dynamics 365 subscription instead of reducing your storage space used through deletion.

Prerequisites

An administrator security role is required. All methods (except three and five) require this role, such as System Administrator. An admin role gives you permission to delete records in bulk and delete system jobs.

Understand how storage works

  • Storage consumed doesn't directly correspond to the size reported in Microsoft Dataverse for Apps. Consumption includes extra storage for metadata and encryption. For example, removing 10 MB of storage from a file doesn't mean the file size is reduced by 10 MB.
  • Some platform operations require you to wait 24-36 hours to confirm data size changes. These operations include upgrades to new versions and introduction of new workflows. Such operations require system adjustments that might result in a momentary size increase report.

Freeing storage for Dataverse

Note

The system can take up to 24 hours to update storage information. We recommend waiting up to 24 hours and monitoring your storage.

Use the following methods to free up storage for each of the capacity types.

Storage Affected Table(s) Method
Database
WorkflowLogBase Method 1: Delete bulk email and workflow instances using a bulk deletion job
AsyncOperationBase Method 2: Evaluate and delete suspended workflows
DuplicateRecordBase Method 7: Remove bulk duplicate detection jobs and associated copies of duplicate records
ImportJobBase Method 8: Delete bulk import instances using a bulk deletion job
BulkDeleteOperationBase Method 9: Delete bulk deletion job instances using a bulk deletion job
various Method 11: Remove unrequired tables and columns from Dataverse search
ActivityPointerBase, EmailBase, ActivityPartyBase, and other activity tables Method 12: Remove unrequired data from activity tables
Postbase, PostCommentBase, PostFollowBase, PostLikeBase, PostRegardingBase, PostRoleBase Method 13: Remove unrequired Activity Feeds records
ExchangeSyncIdMappingBase Method 14: Modify Item Level Monitoring Settings
TraceLogBase Method 15: Remove unrequired Trace (Alert) records
File
Attachment Method 3: Remove email attachments using Advanced Find
Attachment Method 4: Remove email messages with attachments using a bulk deletion job
Attachment Method 5: Remove notes with attachments using Advanced Find
Attachment Method 6: Remove notes with attachments using a bulk deletion job
Log
AuditBase Method 10: Delete audit logs
PluginTraceLogBase Delete plug-in trace logs using a bulk deletion job

Reduce file storage

Method 3: Remove email attachments using Advanced Find

Warning

If you delete this data, attachments are no longer available in customer engagement apps. However, if you saved attachments in Office Outlook, they're still there.

  1. Sign in to the Power Platform Admin center.

  2. Select Environments, select an environment from the list, and then select Open.

  3. In the upper-right corner, select Advanced Find (Advanced find button.).

  4. In the Look for list, select Email Messages.

  5. In the search criteria area, add criteria, for example:

    Attachments (Item)

    File Size (Bytes)Is Greater Than - In the text box, type a byte value, such as 1,048,576 (binary for 1 MB).

    Screenshot that shows where you can find attachments in an Advanced Find.

  6. Choose Results.

  7. You now have a list of email messages that have attachments that are larger than 'X' bytes. Review the emails and delete the attachments as needed.

    Screenshot that shows the selected emails list based on a search criteria.

Method 4: Remove email messages with attachments using a bulk deletion job

Warning

If you delete this data, attachments are no longer available in customer engagement apps. However, if you saved attachments in Office Outlook, they're still there.

  1. In the Power Platform Admin center, select an environment.

  2. Select Settings > Data management > Bulk deletion. In the menu bar, select New. The Bulk Deletion Wizard opens.

    Screenshot that shows where the New button is located in an environment.

  3. Choose Next.

  4. In the Look for list, select Email Messages.

  5. In the search criteria area, add similar criteria, for example:

    Status ReasonEqualsSent or Received

    Actual EndOlder Than X Months – 1

    Attachments (Item)

    File Size (Bytes)Is Greater Than – In the text box, type a byte value, such as 1,048,576 (binary for 1 MB).

  6. Group the first two criteria rows:

    1. Choose the arrow next to each criteria row, and then choose Select Row.

    2. With both rows selected, choose Group AND.

      Screenshot that shows the `Group AND` and `Group OR` options in the Define Search Criteria window.

  7. Choose Next.

  8. In the Name text box, type a name for the bulk deletion job.

  9. Select a date and time for the job start time; preferably a time when users aren't in customer engagement apps.

  10. Select the Run this job after every check box, and then in the days list, select the frequency you want the job to run.

    Screenshot that shows where the Run this job every check box is located.

  11. If you want a notification e-mail sent, select the Send an email to me (myemail@domain.com) when this job is finished check box.

  12. Choose Next, review the bulk deletion job, and then choose Submit to create the recurring job.

Method 5: Remove notes with attachments using Advanced Find

Warning

If you delete this data, notes and their associated attachments are no longer available in customer engagement apps.

  1. Sign in to the Power Platform Admin center.

  2. Select Environments, select an environment from the list, and then select Open.

  3. In the upper-right corner, select Advanced Find (Advanced find button.).

  4. In the Look for list, select Notes.

  5. In the search criteria area, add similar criteria, for example:

    File Size (Bytes)Is Greater Than – In the text box, type a byte value, such as 1048576.

    Screenshot that shows the search criteria in the Advanced Find tab.

  6. Choose Results.

  7. You now have a list of attachments that are larger than the size you specified.

    Screenshot that shows the attachment list results of your search in the Advanced Find tab.

  8. Select individual or multiple attachments, then choose Delete (X).

    Screenshot that shows where the X icon is located on the Advanced Find tab.

Method 6: Remove notes with attachments using a bulk deletion job

Warning

If you delete this data, notes and their associated attachments are no longer available in customer engagement apps.

  1. In the Power Platform Admin center, select an environment.

  2. Select Settings > Data management > Bulk deletion. In the menu bar, select New. The Bulk Deletion Wizard opens.

    Screenshot that shows where the New button is located in an environment.

  3. Choose Next.

  4. In the Look for list, select Notes.

  5. In the search criteria area, add similar criteria, for example:

    File Size (Bytes)Is Greater Than – In the text box, type a byte value, such as 1048576.

    Created OnOlder Than X Months – 1

  6. Group the two criteria rows:

    1. Choose the arrow next to each criteria row, and then choose Select Row.

    2. With all three rows selected, choose Group AND.

      Screenshot that shows where the Group AND option is located in the Define Search Criteria window. Method 6.

  7. Choose Next.

  8. In the Name text box, type a name for the bulk deletion job.

  9. Select a date and time for the job start time; preferably a time when users aren't in customer engagement apps.

  10. Select the Run this job after every check box, and then in the days list, select the frequency you want the job to run.

    Screenshot that shows where the Run this job every check box is located.

  11. If you want a notification e-mail sent, select the Send an email to me (myemail@domain.com) when this job is finished check box.

  12. Choose Next, review the bulk deletion job, and then choose Submit to create the recurring job.

Reduce log storage

Microsoft is migrating audit logs to a new storage location. Environments whose data migration is complete can use the new audit delete method. You can identify an environment with completed migration with the Auditing card near the Environment details.

Screenshot that shows where an Auditing tile appears for new storage.

Method 10: Delete audit logs - legacy process

When you enable auditing, customer engagement apps create audit logs to store the audit history of the records. You can delete audit logs to free space when they're no longer needed.

Warning

When you delete an audit log, you can no longer view the audit history for the period covered by that audit log.

  1. Sign in to the Power Platform Admin center.

  2. Select Environments, select an environment from the list, and then select Open.

  3. In the upper-right corner of an app, select Settings (Gear button.) > Advanced Settings > Settings > Auditing.

  4. In the Audit area, choose Audit Log Management.

  5. Select the oldest audit log, then choose Delete Logs.

    Screenshot that shows where the Delete logs button is located in the Audit Log management window.

  6. In the confirmation message, choose OK.

Note

You can only delete the oldest audit log in the system. To delete more than one audit log repeat deleting the oldest available audit log until you have deleted enough logs.

Method 10: Delete audit logs - new process

Microsoft is migrating audit logs to a new storage location. Environments whose data migration is complete can use the new audit delete experience.

When you enable auditing, customer engagement apps create audit logs to store the audit history of the records. You can delete the audit logs to free space when they're no longer needed.

Warning

When you delete an audit log, you can no longer view the audit history for the period covered by that audit log.

  1. Sign in to the Power Platform Admin center, and then select an environment.

  2. Under Auditing, select Delete logs.

    Screenshot that shows where the Delete logs option is located on the Auditing card of an environment.

  3. Delete audit logs to free up log storage capacity for the selected environment.

    Screenshot that shows the Select logs to delete window where you can specify the type of logs you want to delete.

    Setting Description System job name
    Delete logs by table Select one or more tables for which you want to delete audit logs. By default all tables in the environment are shown, whether or not they contain audit data. Delete logs for [number of] tables.
    Delete access logs by people and systems Delete all access logs for all users and systems. Delete access logs.
    Delete all logs up to and including the selected date Delete logs including the date selected. Delete all logs before and including [timestamp].
  4. Select Delete, and then confirm the deletions.

All data is deleted in an asynchronous background system job.

To monitor the status of audit delete jobs, see the next section.

Monitor the status of audit delete jobs in the Power Platform Admin center

  1. In the Power Platform Admin center, select an environment.

  2. Select Settings > Data management > Bulk deletion.

    Screenshot that shows where the Bulk deletion option is located in an environment.

  3. Select the system job name to open details about your delete job.

Reduce database storage

Method 1: Delete bulk email and workflow instances using a bulk deletion job

Warning

If you delete this data, you will no longer be able to tell if an email was sent through bulk email or if a workflow rule ran against a record. The emails that were sent and the actions that ran against the record in the workflow will remain.

  1. In thePower Platform Admin center, select an environment.

  2. Select Settings > Data management > Bulk deletion. In the menu bar, select New. The Bulk Deletion Wizard opens.

    Screenshot that shows where the New button is located in the All Bulk Deletion System Jobs window.

  3. Choose Next.

  4. In the Look for list, select System Jobs.

  5. In the search criteria area, add similar criteria similar, for example:

    System Job TypeEqualsBulk E-mail; Workflow;

    Status ReasonEqualsSucceeded

    Completed OnOlder Than X Months – 1

  6. Group the three criteria rows:

    1. Choose the arrow next to each criteria row, and then choose Select Row.

    2. With all three rows selected, choose Group AND.

      Screenshot that shows where the Group AND option is located in the Define Search Criteria window. Method 1.

  7. Choose Next.

  8. In the Name text box, type a name for the bulk deletion job.

  9. Select a date and time for the job start time; preferably a time when users aren't in customer engagement apps.

  10. Select the Run this job after every check box, and then in the days list, select the frequency you want the job to run.

    Screenshot that shows where the Run this job every check box is located.

  11. If you want a notification e-mail sent, select the Send an e-mail to me (myemail@domain.com) when this job is finished check box.

  12. Choose Next, review the bulk deletion job, and then choose Submit to create the recurring job.

Method 2: Evaluate and delete suspended workflows

Sometimes workflows enter a suspended state because there's a condition that can't be met or some other reason that doesn't allow the workflow to continue.

Warning

Some workflows are in a suspended state because they're waiting for a condition that has not yet been met, which is expected. For example, a workflow may be waiting for a task to be completed.

  1. Sign in to the Power Platform Admin center.

  2. Select Environments, select an environment from the list, and then select Open.

  3. In the upper-right corner, select Advanced Find (Advanced find button.).

  4. In the Look for list, select System Jobs.

  5. In the search criteria area, add similar criteria similar, for example:

    System Job TypeEqualsWorkflow

    Status ReasonEqualsWaiting

  6. Group the two criteria rows:

    1. Choose the arrow next to each criteria row, and then choose Select Row.

    2. With both rows selected, choose Group AND.

    Screenshot that shows where the Group AND is located on the Advanced Find tab.

  7. Choose Results.

  8. In the results window, you can open each item to determine whether the workflow can be deleted.

Method 7: Remove bulk duplicate detection jobs and associated copies of duplicate records

Every time that a duplicate detection job runs, a copy of each duplicate record is stored in the database as part of the duplicate detection job.

For example, if you have 100 duplicate records, every time that you run a duplicate detection job that finds these duplicates, whether it's manual or reoccurring, those 100 duplicate records are stored in the database under that instance of that duplicate job until the duplicates are merged or deleted, or until the instance of that duplicate detection job is deleted.

  1. In the Power Platform Admin center, select an environment.

  2. Select Settings > Data management > Duplicate Detection Jobs.

    Screenshot that shows where the Duplicate detection jobs option is located in the Settings of an environment.

  3. Select the duplicate detection job instances you want to delete and then choose Delete (X).

    To avoid wasting storage space, make sure duplicates are resolved promptly so that they aren't reported in multiple duplicate detection jobs.

    Screenshot that shows where the X icon is located in the Duplicate Detection Jobs window of Dynamic 365.

Method 8: Delete bulk import instances using a bulk deletion job

Every time you perform a bulk import, there's a system job associated with that import. The system job details show, which records imported successfully and which records failed.

Warning

After you delete these bulk import jobs, you will not be able to see what data was imported and you cannot roll back the import.

  1. In the Power Platform Admin center, select an environment.

  2. Select Settings > Data management > Bulk deletion. In the menu bar, select New. The Bulk Deletion Wizard opens.

Screenshot that shows where the Bulk deletion option is located in the Settings of an environment.

  1. Choose Next.

  2. In the Look for list, select System Jobs.

  3. In the search criteria area, add similar criteria, for example:

    System Job TypeEqualsImport

    Status ReasonEqualsSucceeded

    Completed OnOlder Than X Months – 1

  4. Group the three criteria rows:

    1. Choose the arrow next to each criteria row, and then choose Select Row.

    2. With all three rows selected, choose Group AND.

      Screenshot that shows where the Group AND option is located in the Define Search Criteria window. Method 8.

  5. Choose Next.

  6. In the Name text box, type a name for the bulk deletion job.

  7. Select a date and time for the job start time; preferably a time when users aren't in customer engagement apps.

  8. Select the Run this job after every check box, and then in the days list, select the frequency you want the job to run.

    Screenshot that shows where the Run this job every check box is located.

  9. If you want a notification e-mail sent, select the Send an email to me (myemail@domain.com) when this job is finished check box.

  10. Choose Next, review the bulk deletion job, and then choose Submit to create the recurring job.

Method 9: Delete bulk deletion job instances using a bulk deletion job

When you're deleting bulk data, a bulk deletion system job is created and can be deleted.

Warning

After you delete these jobs, you will lose the history of the prior bulk deletion jobs that you've run.

  1. In the Power Platform Admin center, select an environment.

  2. Select Settings > Data management > Bulk deletion. In the menu bar, select New. The Bulk Deletion Wizard opens.

    Screenshot that shows where the New button is located in the All Bulk Deletion System Jobs window.

  3. Choose Next.

  4. In the Look for list, select System Jobs.

  5. In the search criteria area, add similar criteria, for example:

    System Job TypeEqualsBulk Delete

    Status ReasonEqualsSucceeded

    Completed OnOlder Than X Months – 1

    Note

    You could also delete jobs that have failed or been canceled.

  6. Group the three criteria rows:

    1. Choose the arrow next to each criteria row, and then choose Select Row.

    2. With all three rows selected, choose Group AND.

      Screenshot that shows where The Group AND option is located in the Define Search Criteria window.

  7. Choose Next.

  8. In the Name text box, type a name for the bulk deletion job.

  9. Select a date and time for the job start time; preferably a time when users aren't in customer engagement apps.

  10. Select the Run this job after every check box, and then in the days list, select the frequency you want the job to run.

    Screenshot that shows where the Run this job every check box is located.

  11. If you want a notification e-mail sent, select the Send an email to me (myemail@domain.com) when this job is finished check box.

  12. Choose Next, review the bulk deletion job, and then choose Submit to create the recurring job.

Tables and tables fields enabled for Dataverse search affect the database storage capacity.

Method 12: Remove unrequired data from activity tables

These tables store records for activities such as emails, appointments, tasks, calls, etc. To learn more about what data these tables contain, see Activities data model and storage.

Method 13: Remove unrequired Activity Feeds records

These tables store post related records for Activity Feeds functionality. To free space, you can delete any Post records, which are no longer required.

Method 14: Modify Item Level Monitoring Settings

The ExchangeSyncIdMappingBase table contains references between Dynamics 365 records and the corresponding records in Microsoft Exchange. This table is used by the Server-Side Synchronization feature, which enables synchronization of emails, appointments, contacts, and tasks between Dynamics 365 and Microsoft Exchange.

Extra rows are stored in this table to help with troubleshooting the synchronization of specific items. For more information, see Troubleshoot item level Server-Side Synchronization issues with Microsoft Dynamics 365. This article provides details regarding how you can reduce the default duration (three days) of how long these troubleshooting records exist. This troubleshooting feature can also be disabled. Rows unrelated to this feature can't be deleted and are required for Appointment, Contact, and Task synchronization.

Method 15: Remove unrequired Alerts (trace logs)

The Server-Side Synchronization feature logs alerts when different events occur such as a mailbox encountering an error or warning. There are also informational alerts logged when you enable a mailbox. You can view these Alerts when you view a Mailbox or Email Server profile within the Email Configuration area of Advanced Settings. While these records appear in a tab called Alerts, they're actually Trace records. To free space consumed by these Alerts, you can delete any Trace records, which are no longer required. Trace records can be deleted within the Alerts tab of an Email Server Profile or Mailbox record. They can also be deleted using Advanced Find or a Bulk Delete job.

You can also configure which levels of alerts are logged. See System Settings Email tab.

Free up storage used by flow approvals

See Delete approval history from Power Automate.

See also

Dataverse storage capacity