Email account IMAP fail for user not connect

Aryan
Tera Contributor

Aryan_0-1781101389960.png

 


I am getting this error, not sure why can anyone help me on this.

 

>> IMAP is enabled on the mailbox

>> API permission is also there with admin consent.

 

Not sure what else i need to check??

I am following this KB - > https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0816072

 

1 REPLY 1

Tanushree Maiti
Tera Patron

Hi @Aryan 

 

Refer: User is authenticated but not connected. 

 

Remediation Steps:

  1. IMAP Enablement
    • Ensure IMAP is enabled for the mailbox user on the target tenant. Tenant admins can check and enable this in Exchange Online admin center under mailbox features.
    1. API Permissions
      • Check your Azure app registration includes IMAP.AccessAsUser.All (Delegated) and the required SMTP.Send and Mail permissions, as shown in your screenshot.
        • Confirm the permissions have been granted consent (admin consent may be needed in some tenants, even if not indicated in portal).
        1. Tenant Consent/Approval
          • For delegated permissions, organizational users may need tenant admin consent. If users get “need admin approval” errors, the tenant admin should grant access to the required delegated scopes for your app.
          1. Conditional Access/Policies
            • Review any conditional access policies or security restrictions on the tenant, which may block access for IMAP or specific clients. Blocking legacy authentication can affect certain IMAP flows, even for OAuth.
            1. Session/Rate Limits
              • Office 365 IMAP implementation can lock out users if too many sessions are opened/closed rapidly. Wait a few minutes, disable and re-enable IMAP as a test, and avoid frequent reconnects during troubleshooting.
              1. Token Scope/Resource
                1. Mailbox Licensing
                  • Verify the mailbox account being accessed is licensed. Unlicensed/shared mailboxes or service accounts may not authenticate successfully through OAuth IMAP.
                  1. Firewall/Network
                    • Confirm that IMAP (port 993) and SMTP traffic is allowed to Microsoft 365 endpoints from the client network.

Please refer to:

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti