When you cancel your Office 365 tenancy, there are two important dates you need to know about (listed below):
Once you cancel your accounts and your tenancy, all of your accounts will remain active until the end of your billing cycle, which is the first of the two dates in the screenshot below.
After your accounts expire, your data gets held for 6 months before it finally gets deleted.
It’s important to note that if you are hoping to export all your data out of Exchange Online or SharePoint, you’ll need to do it while your subscription is still active. Once your subscription is cancelled, you won’t be able to log in as those users to export their data, and at this point, Microsoft doesn’t provide any tools or utilities for getting your data out. There are third party migration utilities out there, but the tried and true methods of exporting mailboxes to .pst files require active accounts.