<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Apache Nifi IMAP/POP3 authentocation Error in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-IMAP-POP3-authentocation-Error/m-p/399802#M250549</link>
    <description>&lt;P&gt;Hi Team,&lt;BR /&gt;&lt;BR /&gt;I am getting Authentication Error in ConsumeIMAP 1.23.2and ConsumePOP3 1.23.2 processor. Details are descrideb as below:&lt;BR /&gt;Hostname : outlook.office365.com&lt;/P&gt;&lt;P&gt;Port : 995( For POP3)/993 (For IMAP)&lt;/P&gt;&lt;P&gt;Autherization Mode : OAUTH2 (Also Manually verified using the details of autherization serverURL and clientID/Secret, it has all relevant access to generate token)&lt;/P&gt;&lt;P&gt;Error Details:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ConsumePOP3[id=x3603x64-5f1c-1219-xxxx-xxxx34ffc1] Processing failed: org.apache.nifi.processor.exception.ProcessException: Failed to receive messages from Email server: [javax.mail.AuthenticationFailedException - Read timed out - Caused by: javax.mail.AuthenticationFailedException: Read timed out&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jan 2025 09:33:21 GMT</pubDate>
    <dc:creator>PriyankaMondal</dc:creator>
    <dc:date>2025-01-08T09:33:21Z</dc:date>
    <item>
      <title>Apache Nifi IMAP/POP3 authentocation Error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-IMAP-POP3-authentocation-Error/m-p/399802#M250549</link>
      <description>&lt;P&gt;Hi Team,&lt;BR /&gt;&lt;BR /&gt;I am getting Authentication Error in ConsumeIMAP 1.23.2and ConsumePOP3 1.23.2 processor. Details are descrideb as below:&lt;BR /&gt;Hostname : outlook.office365.com&lt;/P&gt;&lt;P&gt;Port : 995( For POP3)/993 (For IMAP)&lt;/P&gt;&lt;P&gt;Autherization Mode : OAUTH2 (Also Manually verified using the details of autherization serverURL and clientID/Secret, it has all relevant access to generate token)&lt;/P&gt;&lt;P&gt;Error Details:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ConsumePOP3[id=x3603x64-5f1c-1219-xxxx-xxxx34ffc1] Processing failed: org.apache.nifi.processor.exception.ProcessException: Failed to receive messages from Email server: [javax.mail.AuthenticationFailedException - Read timed out - Caused by: javax.mail.AuthenticationFailedException: Read timed out&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2025 09:33:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-IMAP-POP3-authentocation-Error/m-p/399802#M250549</guid>
      <dc:creator>PriyankaMondal</dc:creator>
      <dc:date>2025-01-08T09:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Nifi IMAP/POP3 authentocation Error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-IMAP-POP3-authentocation-Error/m-p/404586#M252343</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/101202"&gt;@PriyankaMondal&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Looking at your error message log, I can see you're experiencing authentication timeouts with ConsumeIMAP and ConsumePOP3 processors when connecting to Microsoft Office 365 services.&lt;BR /&gt;&lt;STRONG&gt;&lt;U&gt;Possible Blockers&lt;/U&gt;&lt;BR /&gt;Timeout Issue&lt;BR /&gt;&lt;/STRONG&gt;The primary error is "Read timed out" during authentication, which suggests the connection to Office 365 is being established but then timing out during the OAUTH2 handshake.&lt;BR /&gt;&lt;STRONG&gt;Microsoft 365 Specific Considerations&lt;BR /&gt;&lt;/STRONG&gt;Microsoft has specific requirements for modern authentication with mail services and has been deprecating basic authentication methods.&lt;BR /&gt;&lt;STRONG&gt;Processor Configuration&lt;BR /&gt;&lt;/STRONG&gt;Using OAUTH2 authentication mode, is correct for Office 365, but there may be issues with the token acquisition or timeout settings.&lt;BR /&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;U&gt;Possible solutions&lt;BR /&gt;&lt;/U&gt;1. Check timeout settings&lt;U&gt;&lt;BR /&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-SPOILER&gt;# Add these properties to your processor configuration&lt;BR /&gt;mail.imap.connectiontimeout=60000&lt;BR /&gt;mail.imap.timeout=60000&lt;BR /&gt;mail.pop3.connectiontimeout=60000&lt;BR /&gt;&amp;nbsp;.pop3.timeout=60000&lt;/LI-SPOILER&gt;&lt;P&gt;&lt;STRONG&gt;2.&amp;nbsp;Verify Modern Authentication settings&lt;BR /&gt;&lt;/STRONG&gt;Ensure the account has Modern Authentication enabled in Microsoft 365 Admin Center&lt;STRONG&gt;&lt;U&gt;&lt;BR /&gt;&lt;/U&gt;&lt;/STRONG&gt;Verify the application registration in Azure AD has the correct permissions&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT color="#FF6600"&gt;IMAP.AccessAsUser.All &lt;/FONT&gt;for IMAP&lt;/LI&gt;&lt;LI&gt;&lt;FONT color="#FF6600"&gt;POP.AccessAsUser.All &lt;/FONT&gt;for POP3&lt;/LI&gt;&lt;LI&gt;&lt;FONT color="#FF6600"&gt;offline_access &lt;/FONT&gt;&lt;SPAN&gt;scope for refresh tokens&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;3.&amp;nbsp;Update NiFi Mail Libraries&lt;BR /&gt;&lt;/STRONG&gt;NiFi's default JavaMail implementation might have compatibility issues with Office 365. Try:&lt;/P&gt;&lt;UL class=""&gt;&lt;LI&gt;Updating to the latest version of NiFi (if possible)&lt;/LI&gt;&lt;LI&gt;Or add Microsoft's MSAL (Microsoft Authentication Library) JAR to NiFi's lib directory&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;4.&amp;nbsp;Use a Custom SSL Context Service&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="whitespace-pre-wrap break-words"&gt;Microsoft servers might require specific TLS settings&lt;/P&gt;&lt;LI-SPOILER&gt;# Create a Standard SSL Context Service with:&lt;BR /&gt;Protocol: TLS&lt;BR /&gt;# Add to Advanced Client settings for the processor&lt;/LI-SPOILER&gt;&lt;P&gt;&lt;STRONG&gt;5.&amp;nbsp;Alternative Approach: Use Microsoft Graph API&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="whitespace-pre-wrap break-words"&gt;Since Microsoft is moving away from direct IMAP/POP3 access, consider:&lt;/P&gt;&lt;UL class=""&gt;&lt;LI&gt;Using InvokeHTTP processor to authenticate against Microsoft Graph API&lt;/LI&gt;&lt;LI&gt;Use the Graph API endpoints to retrieve email content&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;6.&amp;nbsp;Check Proxy Settings&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="whitespace-pre-wrap break-words"&gt;If your environment uses proxies&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;P class="whitespace-pre-wrap break-words"&gt;&lt;SPAN&gt;# Add these properties&lt;/SPAN&gt;&lt;BR /&gt;mail.imap.proxy.host=your-proxy-host&lt;BR /&gt;mail.imap.proxy.port=your-proxy-port&lt;BR /&gt;mail.pop3.proxy.host=your-proxy-host&lt;BR /&gt;mail.pop3.proxy.port=your-proxy-port&lt;/P&gt;&lt;/LI-SPOILER&gt;&lt;P class="whitespace-pre-wrap break-words"&gt;&lt;STRONG&gt;7. Implementation Steps&lt;/STRONG&gt;&lt;/P&gt;&lt;OL class=""&gt;&lt;LI&gt;Update the processor configuration with extended timeout values&lt;/LI&gt;&lt;LI&gt;Verify OAuth2 settings in the processor match exactly with your Azure application registration&lt;/LI&gt;&lt;LI&gt;Check Microsoft 365 account settings to ensure IMAP/POP3 is enabled with Modern Authentication&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Consider implementing a token debugging flow using InvokeHTTP to validate token acquisition separately&lt;BR /&gt;&lt;BR /&gt;Happy hadooping&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 21:37:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-IMAP-POP3-authentocation-Error/m-p/404586#M252343</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2025-03-21T21:37:33Z</dc:date>
    </item>
  </channel>
</rss>

