cancel
Showing results for 
Search instead for 
Did you mean: 

Cloud Integration – Connect to Microsoft 365 Shared Mailbox with OAuth2

akbsap
Explorer
0 Kudos

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?

former_member27
Community Manager
Community Manager

Welcome to the SAP Community! Thank you for visiting us to get answers to your questions.

Since you're asking a question here for the first time, I'd like to offer some friendly advice on how to get the most out of your community membership and experience.

First, please see https://community.sap.com/resources/questions-and-answers, as this resource page provides tips for preparing questions that draw responses from our members. Secondly, feel free to take our Q&A tutorial at https://developers.sap.com/tutorials/community-qa.html as well, as that will help you when submitting questions to the community.

Finally, I recommend that you include a profile picture. By personalizing your profile, you encourage readers to respond: https://developers.sap.com/tutorials/community-profile.html.

I hope you find this advice useful, and we're happy to have you as part of SAP Community!

Regards,

Dedi

VijayKonam
Active Contributor
0 Kudos

Yes. While configuring OAuth2 Authorization code, do not forget to suffix the Authorization URL with "?prompt=login"

Vijay Konam

franz_forsthofer
Employee
Employee

Hi Anindya,

I added the chapter "Using Shared Mailbox" in the blog Cloud Integration – Connect to Microsoft 365 Mail with OAuth2 | SAP Blogs. Please have a look.

akbsap
Explorer
0 Kudos

Hi franz.forsthofer, thanks for your response. This setup requires IMAP to be enabled on personal mailbox in Exchange which has delegate permission to the shared mailbox. Is there anyway to bypass this?

Accepted Solutions (0)

Answers (0)