Announcing OAuth Support for POP in Exchange Online

Published May 28 2020 08:00 AM 29.3K Views

Just a couple of weeks or so after our announcement of OAuth support for IMAP and SMTP Auth in Exchange Online, today we’re happy to be able to confirm OAuth support for POP is also now available in Exchange Online.

Application developers who have built apps that send, read or otherwise process email using these protocols will be able to implement secure, modern authentication experiences for their users. This functionality is built on top of Microsoft Identity platform (v2.0) and supports access to email of Microsoft 365 (formerly Office 365) users.

Detailed step-by-step instructions for authenticating to IMAP, POP and SMTP AUTH protocols using OAuth are now available for you to get started.

What’s supported?

With this release, apps can use one of the following OAuth flows to authorize and get access tokens on behalf of a user.

  1. OAuth2 authorization code flow
  2. OAuth2 Device authorization grant flow

OAuth2 client credentials grant flow that enables access without a user account is not supported. If your application needs persistent access to all mailboxes in a Microsoft 365 organization, we recommend that you use the Microsoft Graph API’s which allow access without a user in addition to access on behalf of a user, enable granular permissions and let administrators scope such access to a specific set of mailboxes.

Follow these detailed step-by-step instructions to implement OAuth 2.0 authentication if your in-house application needs to access IMAP, POP and SMTP AUTH protocols in Exchange Online, or work with your vendor to update any apps or clients that you use that could be impacted.

The Exchange Team

15 Comments
%3CLINGO-SUB%20id%3D%22lingo-sub-1406600%22%20slang%3D%22en-US%22%3EAnnouncing%20OAuth%20Support%20for%20POP%20in%20Exchange%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1406600%22%20slang%3D%22en-US%22%3E%3CP%3EJust%20a%20couple%20of%20weeks%20or%20so%20after%20-ERR%3AREF-NOT-FOUND-our%20announcement%20of%20OAuth%20support%20for%20IMAP%20and%20SMTP%20Auth%20in%20Exchange%20Online%2C%20today%20we%E2%80%99re%20happy%20to%20be%20able%20to%20confirm%20OAuth%20support%20for%20POP%20is%20also%20now%20available%20in%20Exchange%20Online.%3C%2FP%3E%0A%3CP%3EApplication%20developers%20who%20have%20built%20apps%20that%20send%2C%20read%20or%20otherwise%20process%20email%20using%20these%20protocols%20will%20be%20able%20to%20implement%20secure%2C%20modern%20authentication%20experiences%20for%20their%20users.%20This%20functionality%20is%20built%20on%20top%20of%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Factive-directory%2Fdevelop%2Fv2-overview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EMicrosoft%20Identity%20platform%20(v2.0)%3C%2FA%3E%26nbsp%3Band%20supports%20access%20to%20email%20of%20Microsoft%20365%20(formerly%20Office%20365)%20users.%3C%2FP%3E%0A%3CP%3EDetailed%20step-by-step%20instructions%20for%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fexchange%2Fclient-developer%2Flegacy-protocols%2Fhow-to-authenticate-an-imap-pop-smtp-application-by-using-oauth%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Eauthenticating%20to%20IMAP%2C%20POP%20and%20SMTP%20AUTH%20protocols%20using%20OAuth%3C%2FA%3E%26nbsp%3Bare%20now%20available%20for%20you%20to%20get%20started.%3C%2FP%3E%0A%3CP%3EWhat%E2%80%99s%20supported%3F%3C%2FP%3E%0A%3CP%3EWith%20this%20release%2C%20apps%20can%20use%20one%20of%20the%20following%20OAuth%20flows%20to%20authorize%20and%20get%20access%20tokens%26nbsp%3B%3CU%3Eon%20behalf%20of%20a%20user%3C%2FU%3E.%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Factive-directory%2Fdevelop%2Fv2-oauth2-auth-code-flow%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EOAuth2%20authorization%20code%20flow%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Factive-directory%2Fdevelop%2Fv2-oauth2-device-code%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EOAuth2%20Device%20authorization%20grant%20flow%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Factive-directory%2Fdevelop%2Fv2-oauth2-client-creds-grant-flow%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EOAuth2%20client%20credentials%20grant%20flow%3C%2FA%3E%26nbsp%3Bthat%20enables%20access%20without%20a%20user%20account%20is%26nbsp%3B%3CU%3Enot%20supported%3C%2FU%3E.%20If%20your%20application%20needs%20persistent%20access%20to%20all%20mailboxes%20in%20a%20Microsoft%20365%20organization%2C%20we%20recommend%20that%20you%20use%20the%20Microsoft%20Graph%20API%E2%80%99s%20which%20allow%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fauth-v2-service%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Eaccess%20without%20a%20user%3C%2FA%3E%26nbsp%3Bin%20addition%20to%20access%20on%20behalf%20of%20a%20user%2C%20enable%20granular%20permissions%20and%20let%20administrators%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fauth-limit-mailbox-access%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Escope%20such%20access%20to%20a%20specific%20set%20of%20mailboxes%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3EFollow%20these%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fexchange%2Fclient-developer%2Flegacy-protocols%2Fhow-to-authenticate-an-imap-pop-smtp-application-by-using-oauth%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Edetailed%20step-by-step%20instructions%3C%2FA%3E%26nbsp%3Bto%26nbsp%3Bimplement%26nbsp%3BOAuth%202.0%26nbsp%3Bauthentication%26nbsp%3Bif%20your%20in-house%20application%20needs%26nbsp%3Bto%20access%26nbsp%3BIMAP%2C%20POP%20and%20SMTP%20AUTH%26nbsp%3Bprotocols%20in%20Exchange%20Online%2C%20or%20work%20with%20your%20vendor%20to%20update%20any%20apps%20or%20clients%20that%20you%20use%20that%20could%20be%20impacted.%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%23FF6600%22%3EThe%20Exchange%20Team%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1406600%22%20slang%3D%22en-US%22%3E%3CP%3EJust%20a%20couple%20of%20weeks%20or%20so%20after%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fexchange-team-blog%2Fannouncing-oauth-2-0-support-for-imap-and-smtp-auth-protocols-in%2Fba-p%2F1330432%22%20target%3D%22_blank%22%3Eour%20announcement%20of%20OAuth%20support%20for%20IMAP%20and%20SMTP%20Auth%20in%20Exchange%20Online%3C%2FA%3E%2C%20today%20we%E2%80%99re%20happy%20to%20be%20able%20to%20confirm%20OAuth%20support%20for%20POP%20is%20also%20now%20available%20in%20Exchange%20Online.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1406600%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Eall%20posts%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAnnouncements%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Edevelopment%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExchange%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Eprotocols%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESecurity%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1425494%22%20slang%3D%22en-US%22%3ERe%3A%20Announcing%20OAuth%20Support%20for%20POP%20in%20Exchange%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1425494%22%20slang%3D%22en-US%22%3E%3CP%3EWill%20any%20of%20the%20Microsoft%20email%20clients%20support%20OAUTH%20for%20POP%2FIMAP%2FSMTP%3F%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1442378%22%20slang%3D%22en-US%22%3ERe%3A%20Announcing%20OAuth%20Support%20for%20POP%20in%20Exchange%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1442378%22%20slang%3D%22en-US%22%3E%3CP%3EWhen%20will%20Outlook.com%20consumer%20version%20support%20this%20functionality%20to%20access%20Outlook%20365%20mailboxes%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1430712%22%20slang%3D%22en-US%22%3ERe%3A%20Announcing%20OAuth%20Support%20for%20POP%20in%20Exchange%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1430712%22%20slang%3D%22en-US%22%3E%3CP%3EGreat%20news!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1498896%22%20slang%3D%22en-US%22%3ERe%3A%20Announcing%20OAuth%20Support%20for%20POP%20in%20Exchange%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1498896%22%20slang%3D%22en-US%22%3E%3CBLOCKQUOTE%3E%3CHR%20%2F%3E-ERR%3AREF-NOT-FOUND-OAuth2%20client%20credentials%20grant%20flow%26nbsp%3Bthat%20enables%20access%20without%20a%20user%20account%20is%26nbsp%3B%3CU%3Enot%20supported%3C%2FU%3E.%20If%20your%20application%20needs%20persistent%20access%20to%20all%20mailboxes%20in%20a%20Microsoft%20365%20organization%2C%20we%20recommend%20that%20you%20use%20the%20Microsoft%20Graph%20API%E2%80%99s%20which%20allow%26nbsp%3B-ERR%3AREF-NOT-FOUND-access%20without%20a%20user%26nbsp%3Bin%20addition%20to%20access%20on%20behalf%20of%20a%20user%2C%20enable%20granular%20permissions%20and%20let%20administrators%26nbsp%3B-ERR%3AREF-NOT-FOUND-scope%20such%20access%20to%20a%20specific%20set%20of%20mailboxes.%3CP%20class%3D%221593530714534%22%3E%26nbsp%3B%3C%2FP%3E%3C%2FBLOCKQUOTE%3E%3CP%20class%3D%221593530714534%22%3EBut%20why%3F%20We%20have%20background%20services%20sending%20and%20reading%20emails%20using%20SMTP%2C%20POP%20and%20IMAP%2C%20%3CU%3E%3CSTRONG%3Ewithout%20user%20interaction%3C%2FSTRONG%3E%3C%2FU%3E.%20Adding%20OAuth2%20for%20authentication%20will%20make%20those%20protocols%20just%20as%20safe%20as%20all%20other%20places%20where%20OAuth2%20is%20implemented.%3C%2FP%3E%3CP%20class%3D%221593530714534%22%3EWe%20were%20waiting%20for%20this%2C%20and%20now%20we%20are%20still%20forced%20to%20implement%20Graph%20API%2C%20because%20the%20grant%20flow%20we%20need%20will%20not%20be%20supported...%3C%2FP%3E%3CP%20class%3D%221593530714534%22%3EOAuth2%20and%20SMTP%20works%20perfectly%20for%20Gmail.%26nbsp%3B%20Why%20is%20Microsoft%20still%20forcing%20us%20to%20implement%20another%20protocol%20specifically%20for%20handling%20Exchange%20Email%20%3F%3F%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1518839%22%20slang%3D%22en-US%22%3ERe%3A%20Announcing%20OAuth%20Support%20for%20POP%20in%20Exchange%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1518839%22%20slang%3D%22en-US%22%3E%3CP%3EI've%20registered%20my%20app%20on%20Azure%20and%20have%20enabled%20API%20Application%20Permissions%20for%20MS%20Graph(%20POP.AccessAsUser.All%2C%20User.ReadBasic.All%2C%20User.Read.Write).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20able%20to%20request%20a%20valid%20OAuth%20token%20from%20Graph%20endpoints.%20However%2C%20when%20I%20use%20the%20token%20and%20try%20to%20log%20into%20the%20POP%20server%2C%20I%20get%20the%20following%20error%3A%3CBR%20%2F%3E-ERR%20Protocol%20error.%20Connection%20is%20closed.%2010%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20login%20works%20fine%20if%20I%20use%20Basic%20Auth%20instead%20of%20OAuth.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20not%20sure%20how%20to%20troubleshoot%20this.%20Any%20info%20or%20suggestions%20would%20be%20much%20appreciated!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1522389%22%20slang%3D%22en-US%22%3ERe%3A%20Announcing%20OAuth%20Support%20for%20POP%20in%20Exchange%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1522389%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F727026%22%20target%3D%22_blank%22%3E%40Anand_Vashishtha%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20also%20having%20the%20same%20problem%20where%20I%20am%20able%20to%20get%20authentication%20with%20OAuth%20working%20for%20IMAP%20but%20not%20POP.%20Have%20you%20been%20able%20to%20resolve%20this%20issue%3F%20I%20have%20added%20the%20POP%20scope%20listed%20on%20the%20detailed%20steps%20but%20the%20authentication%20failed%20with%20the%20same%20error%20that%20you%20see%20%22%3CSPAN%3EERR%20Protocol%20error.%20Connection%20is%20closed.%2010%22.%3C%2FSPAN%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-gb%2Fexchange%2Fclient-developer%2Flegacy-protocols%2Fhow-to-authenticate-an-imap-pop-smtp-application-by-using-oauth%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-gb%2Fexchange%2Fclient-developer%2Flegacy-protocols%2Fhow-to-authenticate-an-imap-pop-smtp-application-by-using-oauth%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere%20is%20the%20debug%20logs%20from%20Java%20Mail%3A%3C%2FP%3E%3CPRE%3EDEBUG%20POP3%3A%20connecting%20to%20host%20%22%3CA%20href%3D%22http%3A%2F%2Foutlook.office365.com%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20nofollow%22%3Eoutlook.office365.com%3C%2FA%3E%22%2C%20port%20995%2C%20isSSL%20true%3CBR%20%2F%3E%2BOK%20The%20Microsoft%20Exchange%20POP3%20service%20is%20ready.%20%3CBR%20%2F%3ECAPA%3CBR%20%2F%3E%2BOK%3CBR%20%2F%3ETOP%3CBR%20%2F%3EUIDL%3CBR%20%2F%3ESASL%20PLAIN%20XOAUTH2%3CBR%20%2F%3EUSER%3CBR%20%2F%3E.%3CBR%20%2F%3EDEBUG%20POP3%3A%20Attempt%20to%20authenticate%20using%20mechanisms%3A%20XOAUTH2%3CBR%20%2F%3EDEBUG%20POP3%3A%20Using%20mechanism%20XOAUTH2%3CBR%20%2F%3EDEBUG%20POP3%3A%20AUTH%20XOAUTH2%20command%20trace%20suppressed%3CBR%20%2F%3EDEBUG%20POP3%3A%20AUTH%20XOAUTH2%20failed%3C%2FPRE%3E%3CP%3EAs%20you%20can%20see%20the%20OAuth%20connection%20failed%2C%20however%20the%20same%20token%20works%20for%20IMAP%20and%20it%20has%20both%20IMAP%20and%20POP%20scopes.%20I'm%20not%20sure%20what%20is%20going%20on%20here%20and%20if%20it%20is%20an%20issue%20on%20the%20client%2C%20or%20if%20POP%20is%20not%20working%20or%20implemented.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F324116%22%20target%3D%22_blank%22%3E%40The_Exchange_Team%3C%2FA%3E%26nbsp%3B%26nbsp%3BAny%20help%20would%20be%20appreciated!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3ECraig.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1531833%22%20slang%3D%22en-US%22%3ERe%3A%20Announcing%20OAuth%20Support%20for%20POP%20in%20Exchange%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1531833%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F728695%22%20target%3D%22_blank%22%3E%40crshan%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F727026%22%20target%3D%22_blank%22%3E%40Anand_Vashishtha%3C%2FA%3E%26nbsp%3BAre%20you%20splitting%20the%20auth%20command%20into%20two%20lines%20as%20suggested%20in%20the%20example%20for%20POP%3F%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fexchange%2Fclient-developer%2Flegacy-protocols%2Fhow-to-authenticate-an-imap-pop-smtp-application-by-using-oauth%23pop-protocol-exchange%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fexchange%2Fclient-developer%2Flegacy-protocols%2Fhow-to-authenticate-an-imap-pop-smtp-application-by-using-oauth%23pop-protocol-exchange%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1532304%22%20slang%3D%22en-US%22%3ERe%3A%20Announcing%20OAuth%20Support%20for%20POP%20in%20Exchange%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1532304%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20for%20the%20reply%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F362093%22%20target%3D%22_blank%22%3E%40Sivaprakash_saripalli%3C%2FA%3E.%26nbsp%3BI%20am%20using%20the%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Feclipse-ee4j%2Fmail%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EJakarta%20Java%20Mail%3C%2FA%3E%20client%20to%20connect.%20I%20have%20opened%20up%20a%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Feclipse-ee4j%2Fmail%2Fissues%2F461%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Ebug%20request%3C%2FA%3E%20to%20find%20out%20if%20this%20is%20an%20issue%20with%20how%20the%20client%20connects%2C%20or%20missing%20properties%20on%20my%20application.%20I%20believe%20this%20is%20different%20to%20how%20%3CA%20href%3D%22https%3A%2F%2Fdevelopers.google.com%2Fgmail%2Fimap%2Fxoauth2-protocol%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EGoogle%20handle%20the%20connection%3C%2FA%3E%20where%20the%20authentication%20command%20is%20not%20split%20into%20two%20lines%2C%20which%20would%20explain%20why%20it%20works%20for%20Gmail%2C%20but%20not%20Microsoft%20Exchange.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20specification%20does%20show%20the%20connection%20being%20made%20via%20two%20requests%2C%20so%20I%20will%20see%20what%20the%20response%20is%20on%20the%20Java%20client.%20Thanks%20for%20highlighting%20this.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECraig.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1536181%22%20slang%3D%22en-US%22%3ERe%3A%20Announcing%20OAuth%20Support%20for%20POP%20in%20Exchange%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1536181%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F728695%22%20target%3D%22_blank%22%3E%40crshan%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F324116%22%20target%3D%22_blank%22%3E%40The_Exchange_Team%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F362093%22%20target%3D%22_blank%22%3E%40Sivaprakash_saripalli%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20splited%26nbsp%3B%20the%20auth%20command%20into%20two%20lines%20as%20suggested%20for%20pop3%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fexchange%2Fclient-developer%2Flegacy-protocols%2Fhow-to-authenticate-an-imap-pop-smtp-application-by-using-oauth%23pop-protocol-exchange%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fexchange%2Fclient-developer%2Flegacy-protocols%2Fhow-to-authenticate-an-imap-pop-smtp-application-by-using-oauth%23pop-protocol-exchange%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3Ee.g.%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EAUTH%20XOAUTH2%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%3Ebase64%20string%20in%20XOAUTH2%20format%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Ebut%20it%20is%20not%20working%20and%20giving%20the%20same%20below%20error%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E-ERR%20Protocol%20error.%20Connection%20is%20closed.%2010%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1549621%22%20slang%3D%22en-US%22%3ERe%3A%20Announcing%20OAuth%20Support%20for%20POP%20in%20Exchange%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1549621%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F728695%22%20target%3D%22_blank%22%3E%40crshan%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F324116%22%20target%3D%22_blank%22%3E%40The_Exchange_Team%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F362093%22%20target%3D%22_blank%22%3E%40Sivaprakash_saripalli%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20all%2C%3C%2FP%3E%3CP%3EI%20found%20the%20solution%20which%20is%20working%20properly.%3C%2FP%3E%3CP%3EAdd%20below%20scope%26nbsp%3B%3C%2FP%3E%3CP%3E%22%3CA%20href%3D%22https%3A%2F%2Foutlook.office.com%2FPOP.AccessAsUser.All%26quot%3B%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Foutlook.office.com%2FPOP.AccessAsUser.All%22%3C%2FA%3E%26nbsp%3Bexplicitly%20in%20the%20code%20during%20acquire%20token.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1551901%22%20slang%3D%22en-US%22%3ERe%3A%20Announcing%20OAuth%20Support%20for%20POP%20in%20Exchange%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1551901%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F727026%22%20target%3D%22_blank%22%3E%40Anand_Vashishtha%3C%2FA%3E%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20the%20update%20that%20you%20were%20able%20to%20connect.%20Did%20you%20need%20to%20do%20anything%20to%20setup%20the%20permissions%20on%20the%20Azure%20portal%20to%20get%20this%20working%20that%20wasn't%20needed%20for%20IMAP%3F%20I%20also%20saw%20you%20commented%20on%20the%20GitHub%20question%20I%20asked%20on%20the%20Java%20Library%20(%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Feclipse-ee4j%2Fmail%2Fissues%2F461%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Feclipse-ee4j%2Fmail%2Fissues%2F461%3C%2FA%3E)%2C%20so%20I%20assume%20you%20are%20using%20that%20library%20also%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20we%20request%20the%20token%2C%20we%20do%20provide%20the%20POP%20scope%20so%20we%20must%20be%20missing%20something%20else%2C%20or%20do%20not%20have%20permission%20to%20the%20scope%2C%20for%20example%20this%20is%20the%20URL%20we%20generate%20to%20authorize%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Flogin.microsoftonline.com%2Fcommon%2Foauth2%2Fv2.0%2Fauthorize%3Fscope%3Dhttps%253A%252F%252Foutlook.office.com%252FPOP.AccessAsUser.All%26amp%3Bresponse_type%3Dcode%26amp%3Bredirect_uri%3Dhttp.......%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Flogin.microsoftonline.com%2Fcommon%2Foauth2%2Fv2.0%2Fauthorize%3Fscope%3Dhttps%253A%252F%252Foutlook.office.com%252FPOP.AccessAsUser.All%26amp%3Bresponse_type%3Dcode%26amp%3Bredirect_uri%3Dhttp.......%3C%2FA%3E.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECraig.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1552604%22%20slang%3D%22en-US%22%3ERe%3A%20Announcing%20OAuth%20Support%20for%20POP%20in%20Exchange%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1552604%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F728695%22%20target%3D%22_blank%22%3E%40crshan%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%3CSPAN%3EI've%20registered%20my%20app%20on%20Azure%20and%20have%20enabled%20API%20Application%20Permissions%20for%20MS%20Graph(%20POP.AccessAsUser.All%2C%20User.ReadBasic.All%2C%20User.Read.Write)%20for%20pop3%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Eand%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EAdded%20below%20scope%26nbsp%3B%3C%2FP%3E%3CP%3E%22-ERR%3AREF-NOT-FOUND-%3CA%20href%3D%22https%3A%2F%2Foutlook.office.com%2FPOP.AccessAsUser.All%26quot%3B%26nbsp%3Bexplicitly%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Foutlook.office.com%2FPOP.AccessAsUser.All%22%26nbsp%3Bexplicitly%3C%2FA%3E%20in%20the%20code%20during%20acquire%20token.%3C%2FP%3E%3CP%3Eand%20below%20is%20pseudo%20code%20in%20c%23%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eprivate%20readonly%20string%5B%5D%20Scopes%20%3D%20new%20string%5B%5D%20%7B%20%22%3CA%20href%3D%22https%3A%2F%2Foutlook.office.com%2FPOP.AccessAsUser.All%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Foutlook.office.com%2FPOP.AccessAsUser.All%3C%2FA%3E%22%20%7D%3B%3CBR%20%2F%3Eprivate%20const%20string%20LoginURI%20%3D%20%22%3CA%20href%3D%22https%3A%2F%2Flogin.microsoftonline.com%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Flogin.microsoftonline.com%2F%3C%2FA%3E%22%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Em_clientApp%20%3D%20PublicClientApplicationBuilder.Create(m_mailAccount.ClientID)%3CBR%20%2F%3E.WithAuthority(%24%22%7BLoginURI%7D%7Bm_mailAccount.TenantID%7D%22)%3CBR%20%2F%3E.WithDefaultRedirectUri()%3CBR%20%2F%3E.Build()%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAuthenticationResult%20authResult%20%3D%20null%3B%3C%2FP%3E%3CP%3EauthResult%20%3D%20m_clientApp.AcquireTokenSilent(Scopes%2C%20existingUserID).ExecuteAsync().Result%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1571591%22%20slang%3D%22en-US%22%3ERe%3A%20Announcing%20OAuth%20Support%20for%20POP%20in%20Exchange%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1571591%22%20slang%3D%22en-US%22%3E%3CP%3ESplitting%20the%20AUTH%20XOAUTH2%20command%20eliminated%20the%20%22ERR%20Protocol%20error.%20Connection%20is%20closed.%2010%22%20error%20for%20me.%26nbsp%3B%20Microsoft%2C%20please%20fix%20this%20restriction.%26nbsp%3B%20Gmail%20allows%20a%20single%20command%2C%20and%20it's%20faster.%26nbsp%3B%20Also%2C%20how%20about%20better%20error%20messages%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Version history
Last update:
‎May 28 2020 08:00 AM
Updated by:
We support Ukraine and condemn war. Push Russian government to act against war. Be brave, vocal and show your support to Ukraine. Follow the latest news HERE