|
| 1 | +--- |
| 2 | +title: Resolve Issues Configuring Long-Term Storage for Azure Activity Logs |
| 3 | +description: Discusses how to configure long-term storage for Azure Activity Logs past the default 90 days. |
| 4 | +ms.date: 07/23/2025 |
| 5 | +ms.reviewer: v-liuamson; v-gsitser |
| 6 | +ms.service: azure-monitor |
| 7 | +ms.custom: I can’t configure export of Activity Logs |
| 8 | +--- |
| 9 | + |
| 10 | +# Configure long-term storage for Azure Activity Logs |
| 11 | + |
| 12 | +This article discusses how to configure long-term storage for Azure Activity Logs. By default, Activity Logs are retained for 90 days. Users might have to store logs for a longer time for compliance or extended analysis. |
| 13 | + |
| 14 | +## Configure long-term storage |
| 15 | + |
| 16 | +### Step 1: Create a diagnostic setting |
| 17 | + |
| 18 | +1. Go to the [Azure portal](https://ms.portal.azure.com/auth/login/) > **Monitor**. |
| 19 | +1. Under **Settings**, select **Diagnostic settings**. |
| 20 | +1. Select **Add diagnostic setting**. |
| 21 | +1. Under **Activity Log**, select the log that you want to configure. |
| 22 | + |
| 23 | +### Step 2: Specify the destination |
| 24 | + |
| 25 | +1. Got to **Log Analytic** > **Event Hubs** > **Azure Storage**, and select the destinations for your logs. |
| 26 | +1. Set the destination resource to retain logs for more than 90 days. |
| 27 | + |
| 28 | +### Step 3: Configure the retention settings |
| 29 | + |
| 30 | +1. If you use Azure Storage, navigate to the **Storage Account**. |
| 31 | +1. Under **Data Management**, select **Lifecycle Management**. |
| 32 | +1. Set the retention period to your desired duration. |
| 33 | + |
| 34 | +### Step 4: Verify the configuration |
| 35 | + |
| 36 | +1. Return to **Diagnostic settings**, and make sure that your settings are saved. |
| 37 | +1. Check the destination resource to verify that logs are stored as expected. |
| 38 | + |
| 39 | +### Frequently asked questions |
| 40 | + |
| 41 | +**Q1: Why don't the logs appear in the destination?** |
| 42 | + |
| 43 | +**A1:** Make sure that the diagnostic setting is correctly configured and the destination resource is active. |
| 44 | + |
| 45 | +**Q2: Why is the retention period not applied?** |
| 46 | + |
| 47 | +**A2** Verify that the retention settings in the destination resource are set correctly. |
| 48 | + |
| 49 | +## References |
| 50 | + |
| 51 | +- [Azure Monitor Documentation](/azure/azure-monitor/platform/activity-log?tabs=powershell) |
| 52 | +- [Azure Storage Lifecycle Management](/azure/storage/blobs/storage-lifecycle-management-concepts) |
| 53 | + |
| 54 | +## Contact us for help |
| 55 | + |
| 56 | +If you have questions or need help, create a [support request](https://ms.portal.azure.com/#view/Microsoft_Azure_Support/HelpAndSupportBlade/~/overview?DMC=troubleshoot), or ask [Azure community support](/answers/tags/133/azure). You can also submit product feedback to [Azure feedback community](https://feedback.azure.com/d365community). |
0 commit comments