1 min read

Exchange Online – New support for OAuth authentication for SMTP, IMAP and POP

If you are working with Exchange Online, chances are you have some components in your environment (applications, network devices…) which need to access mailboxes hosted in Exchange Online.

Well, until now the only way for most of these components was to use POP/IMAP/SMTP connections; which we all know is not the most secure protocols.

Good news, following the previous announcement of the Basic Authentication retirement, support for OAuth authentication for IMAP and SMTP (POP is currently being rolled out) is now available to access Exchange Online mailboxes.

To start enjoying this, you need first to register an application in Azure AD (see https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app), delegate permissions to this Azure AD application for IMAP/POP/SMTP using the Delegated permissions blade using Microsoft Graph

The permissions to be delegated depend of the protocol you are using

Protocol Permission Scope
IMAP IMAP.AccessAsUser.All
POP POP.AccessAsUser.All
SMTP Auth SMTP.Send

image_thumb  image_thumb[1]  image_thumb[2]
Then using the MSAL client libraries, you need to fetch an access token which will be used for authenticating your application.

OAuth integration with your application requires the use of SASL XOAUTH2 format for encoding and transmitting the access token.

base64(“user=” + userName + “^Aauth=Bearer ” + accessToken + “^A^A”)

Details are available here:

Exchange Online – Get ready for the retirement of Basic Authentication

In the process of re enforcing security, one of the key is to use robust and secure authentication protocols and methods.

Read More

Exchange Online – Use the new Exchange Online PowerShell module v2 with Modern Authentication with your scripts (preview)

As you know, Microsoft is going to retire the basic authentication for Exchange Online PowerShell during the second half of 2021.

Read More

Exchange Online – New version of the Exchange Online PowerShell (aka v2) is now available

As you know, managing Exchange and Exchange Online can be done from either the Exchange Administration Center (EAC) or with PowerShell modules.

Read More