General setup
Add the Office365 tenant in the "C:\Program Files (x86)\Quest\Archive Manager\ConfigurationConsole.exe" > Azure AD and make sure Authentication method is set to Modern

Once tenant is added navigate to: "C:\Program Files (x86)\Quest\Archive Manager\TaskSchedulerCreation.exe" and run as admin. This will create a scheduled task in Windows Task Scheduler:

Now you can start the ESM-Automation task. You will be prompted for the proxy account credentials to Office365. Once successfully logged in, the scanning of the mailboxes will start. It is not unusual for the scanning to fail on the first run. If this is the case, verify the following:
- Client and Tenant ID
- Outlook profile
Client and Tenant ID check
- Verify the ClientID and TenantID are correctly set in the ConfigurationConsole.exe

- You can find the Tenant and Client ID on the Azure Portal https://portal.azure.com and search for App registrations

- Switch to All Applications and click on Archive Manager

- Under essentials you can find the Application (client) ID and Directory (tenant) IDs.

- Copy these values in the Configuration Console > Advanced Settings, check the values and click apply
Outlook profile
We use outlook MAPI to connect to Office 365 and archive the messages. In order to make sure the connection will work, first connect to the QAM server with the ArchiveMGR_ESM account and create a new outlook profile with the proxy account credentials. If you can open Outlook successfully, now you can copy the newly created outlook profile and create a new one following this naming convention:
- ~ArchiveManager.ESM.Contoso_O365_MS_0.User.1
~ArchiveManager.ESM. is the standard prefix
.User.1 is the standard suffix
Contoso_O365_MS_0. this is the Mailserver name which you can find on the QAM Admin website under the mail servers tab
Final test
With the Client and tenant IDs and outlook profile configured, start the ESM automation task in windows task scheduler and the ESM should start archiving (exporting) messages.