Microsoft Office 365 activity fails with ErrorAccessDenied when working with a shared mailbox

How to use O365 activity to read Emails from Shared Mail folder? Microsoft O365 Get mail activity throws error while getting mail from shared mail box. Error: Get Mail: Code: ErrorAccessDenied Message: Access to OData is disabled.

When using the Get Mail or the Move Mail activity from the Microsoft Office 365 package, you can also retrieve emails from a shared mailbox.
However, even if the activity is configured correctly, the below error can occur:

Get Mail: Code: ErrorAccessDenied Message: Access to OData is disabled.

This is caused by a lack of the proper API permissions granted in the Azure app.

In order to solve this, proceed as follows:

  • Set Mail.Read.Shared API delegated permission in the Azure Application