Hi Montoya, Mabelle
Thank you for reaching out to the Q&A Forum.
Based on the behavior you described (sending works, but receiving fails with a permission error), I would like to share some information from my research that I hope will be helpful that this is likely due to how Exchange Online handles authentication for Shared Mailboxes and Legacy Protocols.
Shared Mailboxes are disabled user objects by design, they cannot log in directly. An application must authenticate as a licensed user who has permission to access that shared mailbox. And most importantly, Microsoft has retired Basic Authentication (User + Password) for reading emails via POP3 and IMAP. If your AS400 connector software relies on Basic Auth and does not support Modern Authentication (OAuth 2.0), Exchange Online will reject the connection immediately. This often manifests as a generic "Permission Denied" or connection error.
Here are some recommended solutions you may consider:
- Verify OAuth Support: Check if the AS400 software supports "Modern Authentication" (OAuth). If it only asks for a username and password, it may not be able to connect directly to Exchange Online anymore without an update or a middleware "bridge."
- Use a Service Account: Do not attempt to put the Shared Mailbox credentials into the AS400. Instead, create a licensed user (Service Account), grant that user Full Access to the Shared Mailbox, and use the Service Account’s credentials in the AS400.
- If the AS400 supports IMAP, the username field often requires a specific format to access a delegated mailbox. Try entering the username as:
******@domain.com\SharedMailboxAlias
If the connection still fails, the specific error will be visible in the Azure Active Directory (Entra ID) Sign-in Logs. Please check the logs for the Service Account. If you see a failure reason stating "Application is using Basic Authentication," then the AS400 software is too old to connect directly and will require an intermediary relay or an update.
Here is some additional information you can refer to:
Deprecation of Basic authentication in Exchange Online | Microsoft Learn
Authenticate an IMAP, POP or SMTP connection using OAuth | Microsoft Learn
I hope this information proves helpful.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.