To download a copy of end-user metadata (such as email address, first and last name, and other data), you can use PowerShell cmdlets, including the Get-MsolUser Windows PowerShell cmdlet for Office 365. If you use Exchange Online, you can also use the Get-MailUser and Get-User Exchange PowerShell commands.

Upon expiration or termination of your Office 365 subscription or contract, Microsoft will provide you, by default, additional limited access for 90 days to export your data.