Search code examples
oauth-2.0sharedmailkitmailbox

How can I access mails from Shared mailbox using Mailkit


Recently Microsoft has started to authenticate user with OAuth 2.0 protocol. I have implemented it in Asp.net Core C# and got token.

Now I am able to access mails from main mail Inbox using Mailkit from Microsoft exchange server using OAuth 2.0. But how can I be able to access mails from shared mailbox?

In my code I have mentioned shared mailbox account id.

My code is as follows

Code Getting exception as "Autheticated but not connected". Please guide


Solution

  • Need to give shared mailbox permissions to OAuth app as well and shared mailbox will be accessible.