- Add the "ExchangeOnlineShell" PowerShell module to the automation account
- Create or note credentials of an exchange adminstrator user (make sure conditional access doesn't block any sign-ins for this account)
- Add credentials mentioned above to automation account and name them "EXOCredentials"
Please note that this runbook processess all user-mailboxes!