To import email with Microsoft, you must register an application. You can use any name for this application.This article explains how to register the application. Follow the steps in 'Register an Application', 'Configure Platform Settings', and 'Add Credentials'.
When you get to the 'Configure Platform Settings' step, select 'Mobile and desktop applications'. Use 'https://login.microsoftonline.com/common/oauth2/nativeclient' as the URI.
In the section 'Add Credentials', complete 'Option 2: Add a client secret'.
Record the client secret's value immediately. It is displayed immediately after creation and never again. If you leave the page without recording the value, you'll have to create a new secret.
Before moving back to the QSX configuration dialog, you'll also have to setup permissions for Microsoft Graph. This article explains how to do this in step '2: Configure permissions for Microsoft Graph'. Add the Mail.ReadWrite permission for the application.
If you selected 'Multitenant' and are using an email address that does not belong to this organization or if you selected 'Personal Microsoft Accounts only', you should use 'common' as your Directory ID.
Now you are ready to go back to the Email Import QSX configuration dialog. Copy the Application (client) ID and Directory (tenant) ID from the Entra overview page to the configuration dialog. Next, enter the Client Secret. The last step is to set the 'Mailbox Address' field to the email address of an account in the organization. Once you have done this, you can use the 'Connect' button to initiate the process of acquiring an OAuth token.