Closed p3root closed 3 months ago
You probably need to ask Microsoft Support because I don't know how to format the username string to do what you are trying to do.
If you find out, can you share the answer here? If you can do that, I'll update the FAQ to add this. I'm sure I've gotten other questions about this but I don't remember if/what the answer was.
FWIW, there were other questions about this in the past: https://github.com/jstedfast/MailKit/issues?q=is%3Aissue+is%3Aclosed+shared+mailbox
This is probably the most likely answer to your question: https://github.com/jstedfast/MailKit/issues/1412#issuecomment-1196872919
Check this link. But does not work either. I will contact MS and let you know.
@jstedfast After several weeks of phone calls, emails, etc. with microsoft we got a solution.
For IMAP you need to use the shared mailboxes email address. For SMTP use your users email address Token is the same for both!
Make sure to have SMTP Authentication enabled. Can also be that the shared mailbox needs to have a license. but I could not verify this right now. Updates pending!
For IMAP you need to use the shared mailboxes email address.
So would you use "sharedMailbox@outlook.com"
, for example? Or would it be "username@outlook.com\\sharedMailbox"
?
You need to use sharedMailbox@outlook.com
Hi @jstedfast !
I have some issues authenticating the SMTPClient to Office365 using a shared mailbox. Connecting to my personal account works, but the shared mailbox is not possible.
I have attached some logs for you:
I always get the "S: 535 5.7.3 Authentication unsuccessful". I have enabled SMTP AUTH in my tenant and for my user.
Token seems to be valid, I can connect to my personal mailbox.
I also tried it with "patrik@...\office". Did not work either. Could you provide any help? Or do I need to ask MS.
THANKS Patrik