I created Microsoft Teams 5 Days Retention Policy in https://compliance.microsoft.com but it was not coming into effect. However, Microsoft mentioned that “When you create a Teams retention policy, it will only apply to data that is created from that point forward. If it was created yesterday none of the chats prior to that date will ever be automatically deleted by the policy.”
But in my case all the chats prior 5 days automatically got cleared and that is what mentioned in the policy as well. Check the below snapshot.
Anyways, since the the policy was not coming into effect I raised it with Microsoft and I had to run the below Exchange Online Command to make it work.
PS C:\WINDOWS\system32> Start-ManagedFolderAssistant -Identity "emailaddress"
For more information you can check the article below as reference.
https://techcommunity.microsoft.com/t5/microsoft-teams/retention-policies-not-working/m-p/220185