During an M365 Exchange mailbox restore using Veeam, the following errors can occur:
Failed to open mailbox: user.name@domain.com
Failed to access mailbox.
Mailbox does not exist.
The specified object was not found in the store. Default folder Root not found.
You can find these additional events in the Exchange explorer logs:
Validating if any of the required roles (Global Administrator, Exchange Administrator) is assigned to the current user: admin@domain.com…
Error: The account does not have permission to impersonate the requested user.
This is caused by missing permissions on the account performing the restore, specifically the ApplicationImpersonation role.
To add this permission to the user account we have to connect to Exchange Online using the PowerShell module. The following commands will connect and add the proper role:
Connect-ExchangeOnline -UserPrincipalName admin@domain.com
New-ManagementRoleAssignment –Role ApplicationImpersonation –User admin@domain.com
Make sure to replace admin@domain.com with a global administrator account to run these commands. Then retry the restore and it should go through as expected.