Create a user in the Active Directory which has access to all mailboxes.
This method is called impersonation.Our recommendation: RdxMaildepotImporter.
Grant access permissions to this account.
Execute the following two commands in the Microsoft Exchange Management Shell:
Get-ClientAccessServer | Add-AdPermission -User RdxMailDepotImporter@domain.tld -ExtendedRights ms-Exch-EPI-Impersonation
Get-MailboxDatabase | Add-AdPermission -User RdxMailDepotImporter@domain.tld -ExtendedRights ms-Exch-EPI-May-Impersonate