/
Connection of Microsoft Outlook Email Profile

Connection of Microsoft Outlook Email Profile

A new Email Profile is created to connect to a Microsoft Outlook email profile.

The data is filled out according to the description on the General tab. The OAuth2 authentication type is selected.

To connect, you need to fill in the Client ID, Client Secret, and Discovery URL fields, and then do the following:

Enable SMTP support

Go to https://admin.microsoft.com/Adminportal/Home#/users and navigate to the Active users page. Select the user whose email will be used to process the emails (Fig. 1).

Active Users.png
Fig. 1. Active Users

Click on the display name. The account will open. Select the Mail tab (Fig. 2).

Account.png
Fig. 2. Account

Click on Manage email apps (Fig. 3).

Manage email apps.png
Fig. 3. Manage email apps

Check if the Authenticated SMTP checkbox is selected. If not, select it and click the Save changes button (Fig. 4).

Authenticated SMTP.png
Fig. 4. Authenticated SMTP

Registration of the OAuth client and generation of the secret key

Go to https://entra.microsoft.com/. Select App registrations (Fig. 5).

Microsoft Entra admin center.png
Fig. 5. Microsoft Entra admin center

Click on New registration (Fig. 6).

New registration.png
Fig. 6. New registration

Fill in the Name field. Select the Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) account type. In the Redirect URI, choose Web and enter the following in the field (Fig. 7):

https://XXXXX.XXX.XX/endpoint/oauth2/outlook/callback

Replace XXXXX.XXX.XX with the client's server.

Also, specify this link in the Discovery URL field on the General tab on the Webitel side.

Click the Register button.

Register an application.png
Fig. 7. Register an application

An application is created. Copy the Application (client) ID data. Paste the copied data into the Client ID field on the General tab on the Webitel side.

Click Add a certificate or secret (Fig. 8).

Created application.png
Fig. 8. Created application

The Certificates & secrets page opens. Click on the New client secret button (Fig. 9).

Fig. 9. Certificates & Secrets

In Add a client secret, enter a description and click the Add button (Fig. 10).

Add a client secret.png
Fig. 10. Add a client secret

The client secret is added. On the Certificates & Secrets page, copy the value of the created client secret (Fig. 11). Paste this value into the Client secret field on the General tab on the Webitel side.

Re-copying the client secret value is not possible!

Client secret.png
Fig. 11. Client secret

Assigning permissions

On the application's page (Fig. 8), open API Permissions by clicking on the corresponding label in the Manage block. Click on Add a permission (Fig. 12).

API permissions.png
Fig. 12. API Permissions

The Request API permissions opens. Click on APIs my organization uses. Select Office 365 Exchange Online (Fig. 13).

APIs my organization uses.png
Fig. 13. APIs my organization uses

Select the Application permissions (Fig. 14).

Office 365 Exchange Online (Eng).png
Fig. 14. Application permissions

Scroll down, find and open IMAP. Select IMAP.AccessAsApp (Fig. 15).

IMAP.AccessAsApp  (Eng).png
Fig. 15. IMAP.AccessAsApp

Scroll down, find and open SMTP. Select SMTP.SendAsApp (Fig. 16).

SMTP.SendAsApp (Eng).png
Fig. 16. SMTP.SendAsApp

Click the Add permissions button.

The Request API permissions closes. On the API Permissions page, click Grant admin consent for Webitel. A confirmation modal window will open (Fig. 17).

Grant admin consent for Webitel.png
Fig. 17. Grant admin consent for Webitel

Click the Yes button.

Related content