Skip to Content
Sep 15, 2022 at 08:18 AM

Cloud Integration – Connect to Microsoft 365 Shared Mailbox with OAuth2

1658 Views Last edit Sep 15, 2022 at 06:06 AM 2 rev

With reference to Cloud Integration – Connect to Microsoft 365 Mail with OAuth2 | SAP Blogs

  1. In most cases, the mailbox used with applications is not a user mailbox but a shared mailbox
  2. Shared mailboxes do not have separate login credentials/password
  3. An Application administrator logs in to Azure AD and register the application
  4. In our case, we used the shared mailbox email address in username field of OAuth2 authorization code form in CPI and when we authorize it asks for a password

All the necessary steps required from Exchange/Office 365/Azure AD have been performed as per Authenticate an IMAP, POP or SMTP connection using OAuth | Microsoft Docs

  1. added POP, IMAP permission to AAD application
  2. granted tenant admin consent
  3. registered service principal in Exchange
  4. granted application permission on shared mailbox

When connecting to a shared mailbox access using OAuth, is SAP able to obtain the access token on behalf of a user and replace the userName field in the SASL XOAUTH2 encoded string with the email address of the shared mailbox?