Exchange Online - Prepare For Basic Authentication Deprecation

Microsoft is disabling basic authentication for Exchange Online. What are the pre - requisites to ensure UiPath Robots work consistently?

Issue Description: Microsoft is disabling basic authentication for Exchange Online. How to switch to Oauth2.0 ?

Resolution: As per Microsoft's official statement of Deprecation of Basic Authentication In Exchange Online, Microsoft will deprecate the Basic Authentication for Exchange Online on October 1st, 2022. Read more about the impact of this changes Impact To Messaging Protocols And Existing Applications.

General recommendation:
  1. Check If Your Exchange Online has Modern Authentication enabled.
  2. For a more reliable, long term solution, implement the "Microsoft Office 365" activities into the process. This package offers an activity scope to connect to Office 365 and use their services via API (Graph API).

Below is all the UiPath Official documentation about the Office 365 Scope to make sure all are covered:
Find all available activities from this package by referring About The Microsoft Office 365 Activities Package . Pick each of them and find more details using the left side panel on the website.

Other approaches based on the current process configuration:

Scenario 1: Using Outlook Activities
While reading e-mails using Outlook activities, such as "Get Outlook Mail Messages", the Robots will interact with Outlook, therefore ensure Outlook is up to date and that it supports Modern Authentication. This is enabled by default starting with Outlook 2016.

Scenario 2: Using SMTP, IMAP, POP3 activities
Starting with UiPath.Mail.Activities 1.16.0 - preview those activities will have a new property called "UseOAuth" which indicates whether to use an OAuth2.0 access token instead of a password.

Setting this to "True" will authenticate to Exchange Online via OAuth2.0.

Scenario 3: Using Exchange Activities

If using Exchange activities such as "Get Exchange Mail Messages", it is possible to Create an App Registration in Azure and use it's details to connect to Exchange Online. In the properties panel of the activity find the "Office 365 settings" to input the AppID and TenantID.

Note: The authentication will still be done through Exchange Web Services. Ensure that the organization allows EWS connection from UiPath. For more information check How to Control Access to EWS In Exchange?

To configure the App for delegated authentication the EWS.AccessAsUser.All permission must be added to the API Delegated Permissions in Azure. See How To Authenticate An EWS Application By Using OAuth for Delegated Authentication.

Reference: Get Exchange Mail Messages - Office 365 Settings .

Note: When using this for the first time it is required to make an interactive sign-in from Studio and consent the usage of the app for the entire organization.

Select the AuthenticationType as "Interactive" -> run/debug the project -> Log-in with an Administrator in the Authentication Pop-up and consent the usage of the application.

Similar to this, log-in with an user and request the consent. An admin can later approve it.