Hi @Soumya Banerjee ,
Apologies for the delayed response!
As you suggested, you will need to archive the logs to a storage account in Azure Monitor as described in the article, Create diagnostic settings to send Azure Monitor platform logs and metrics to different destinations.
Activity logs use a different method for archiving since diagnostic settings for Activity logs are created for a subscription, not for a resource group like settings for Azure resources.
The diagnostic setting for activity logs section in this article contains a example of creating a diagnostic setting for an Activity log by adding a resource of type Microsoft.Insights/diagnosticSettings
to the ARM template.
Through this method you should be able to retain the data longer.
Let me know if this helps and if you have further questions!
-
If this answer was helpful to you, please consider "marking as answer" so that others in the community with similar questions can more easily find a solution.