How to block a user's access to their Office 365 mailbox and still be able to migrate the mailbox
说明
How to block users from accessing their mailbox when migrating with On Demand Migration (ODM) and keep administrative access via application impersonation?
解决办法
Within the Microsoft 365 admin center, reset the user's password. This will stop the user from accessing the mailbox.
More information on blocking user access to an Office 365 mailbox can be found here.