Outlook OAUTH issues

POP Peeper: Tech support, suggestions, discussion, etc.
Post Reply
willi.am
Posts: 14
Joined: Sun Oct 06, 2024 5:36 pm

Outlook OAUTH issues

Post by willi.am »

I think I am the problem, and below is not a bug, but I can't figure out how to solve it.

So I am posting it here, maybe someone else has the same issues.

Code: Select all

--- Version ---
OS: Windows 11 (x64) 
POP Peeper: 5.6.3.0
Webmail: 5.1.0.0 (disabled)
SSL: 3.0.16.1
IMAP: 5.6.3.0
SendMail: 5.6.3.0
Profile Picture: 5.6.3.0 (disabled)
AntiJunk: 5.6.3.0 (disabled)
Spell Checker: 5.6.3.0
Trusted Sites: 5.6.3.0 (disabled)
PPTweaker: 5.6.3.0
Updater: 1.0.0.0

Program folder: F:\***
Ini file: F:\***
Data folder: F:\***

--- Error ---
Outlook - *** [1000: IMAP] ['outlook.office365.com' (993) SSL: 1] [Smtp: 'smtp.office365.com' (587) SSL: 2] [oauth: 1] [consec: 5] [enabled: 1]
- Oauth2 error -- There was a problem connecting to the Oauth2 server. Try again later or reset Oauth2 if the problem persists.  Reset Oauth2: pp://OAuth2?***= Edit account: pp://EditAccount?***=

Outlook - *** [1000: IMAP] ['outlook.office365.com' (993) SSL: 1] [Smtp: 'smtp.office365.com' (587) SSL: 2] [oauth: 1] [consec: 5] [enabled: 1]
- Oauth2 error -- There was a problem connecting to the Oauth2 server. Try again later or reset Oauth2 if the problem persists.  Reset Oauth2: pp://OAuth2?***= Edit account: pp://EditAccount?***=

Outlook - *** [1000: IMAP] ['outlook.office365.com' (993) SSL: 1] [Smtp: 'smtp.office365.com' (587) SSL: 2] [oauth: 1] [consec: 5] [enabled: 1]
- Oauth2 error -- There was a problem connecting to the Oauth2 server. Try again later or reset Oauth2 if the problem persists.  Reset Oauth2: pp://OAuth2?***= Edit account: pp://EditAccount?***=

This is my error-log from Pop Peeper Pro (licensed).

I have some Outlook accounts and all work well, until "suddenly" the authorization stops working (and the above error messages pop up).

Sometimes 1 out of 3 accounts does this, sometimes all and when the work... they just work. In between I do not do anything else with settings or something.

When I wait (sometimes for hours) the error disappear and when I turn of the internet (disabling my router) or switching to another network (from LAN to WiFi) the problem CAN be solved... untit it starts hunting me.

The weird thing is, when I "reset" the oAuth Pop Peeper freezes like this;

1. Click on "reset" oAuth
2. Window is shown with the 3 options (web/ form/ inline code)
3. Browser opens (with Outlook oAuth page)
4. All is authorized, browser returns to Pop Peeper (with screen 2.)
5. Pop Peeper freezes; nothing works, wait for a minute or two
6. Pop Peeper comes alive, telling me "oAuth failed" (which did)

Like I said, when I wait for a while, sometimes hours, leaving my computer "on" and continue with my work, it all starts working again like magic.

Weird, he!

Image
Image
Image

BTW. There was a problem connecting to the Oauth2 server can be true (maybe something is blocking it at random intervals?) but when I hit 'authorize' I can connect to the server without problems (in the browser).

O, and none of the three options does work: they all freeze with the same error-message after some time.
User avatar
Jeff
Admin / Developer
Posts: 9441
Joined: Sat Sep 08, 2001 9:46 pm

Re: Outlook OAUTH issues

Post by Jeff »

BTW. There was a problem connecting to the Oauth2 server can be true (maybe something is blocking it at random intervals?) but when I hit 'authorize' I can connect to the server without problems (in the browser).
The URL used for the user-facing login and the URL used for the back-end authentication are 2 different servers, so it's entirely possible for one URL to work and not the other.
4. All is authorized, browser returns to Pop Peeper (with screen 2.)
5. Pop Peeper freezes; nothing works, wait for a minute or two
Your browser will send a "code" back to POP Peeper and it's at this point that PP will validate this code with the Oauth2 server. This is actually the first time that PP will need to communicate with the Oauth2 server (as far as this process is concerned), so it kind of makes sense that it fails at this point, too.



Here are some suggestions:
- Reboot your computer
- Restart your network router
- Make sure Windows doesn't have any pending updates

If that doesn't fix it:
- How often does this occur?
- Do you have any other account types (ie. gmail, yahoo) that use Oauth2? (just wondering if it's specific to outlook or if you just don't have other accounts to prove/disprove that speculation)
- Does exiting/restarting PP fix it?
- Are you using any 3rd party "security" programs that may affect/monitor https traffic?

Also, unless you strongly suspect that you really do need to re-oauth the Outlook accounts, I would recommend against resetting Oauth2. That can sometimes exacerbate problems because it may look suspicious to Outlook.
willi.am
Posts: 14
Joined: Sun Oct 06, 2024 5:36 pm

Re: Outlook OAUTH issues

Post by willi.am »

- Restart computer : did it several times, didn't help
- Restart POP Peeper : idem
- Updates 4 Windows : nope
- How often : several times a day
- Other accounts : POP3 / IMAP4 (own domainserver) and Outlook, so NO Gmail
- 3rd party soft : nope, only Windows Defender (build in scanner)

The problems starts with Pop Peeper saying in the statusbar "xxx@outlook.com : Logging In...", which takes ages.

Then account show underlined (error) and the yellow /!\ is shown in the statusbar.

I have the exact same set-up on another computer (Windows tablet) and there it's working fine... so I guess something at my desktop doesn't like me :-)

Well, I think it's not a PP bug, so you can close it... unless another forummember has the Golden Idea!
User avatar
Jeff
Admin / Developer
Posts: 9441
Joined: Sat Sep 08, 2001 9:46 pm

Re: Outlook OAUTH issues

Post by Jeff »

It seems like a connection problem to me, but I'm not sure why it would be specific to the Outlook oauth2 server, especially if you have another device that it works with (and is presumably on the same internet connection).

One thing that may or may not help is to try to ping the microsoft server and see if that reflects the same problem:
ping login.microsoftonline.com -t

The '-t' will keep pinging until you stop it (Ctrl+C); I'd suggest letting it run for 5-10 minutes and then get final statistics. Any packet loss > 0% could be a sign of issues.
DarkNexxus
Posts: 7
Joined: Fri May 20, 2005 1:09 am

Re: Outlook OAUTH issues

Post by DarkNexxus »

Not having the same issue as the OP. I am having one something similiar. Each time I reboot/restart my pc, I have to renew the OAUTH credentials for my hotmail and outlook accounts. My gmail accounts are fine. It's only the MS accounts. I read what you told the OP. So I'll save you some time.
Rebooted: several times
Reset the modem: Check
Do some updates: Upgraded to Win 11 (or downgraded depending on your POV)
Only software in use is my Defender that is forced with Windows.
Restarting Poppeeper causes the same issue.
Version I'm using is POP Peeper v5.6.3 with Webmail V. 5.1.0.0 It's grayed out and the CRC has no value
Webmail plugin is set to auto update.

Any help would be appreciated.
User avatar
Jeff
Admin / Developer
Posts: 9441
Joined: Sat Sep 08, 2001 9:46 pm

Re: Outlook OAUTH issues

Post by Jeff »

Do you get a warning in the error dialog that your ini file is read-only (or something similar to that effect)?

Even if not, you may want to check if changes you make are being saved: change something noticeable -- such as the main window position/size -- then exit/restart POP Peeper and see if that change persisted. Let us know the result.
DarkNexxus
Posts: 7
Joined: Fri May 20, 2005 1:09 am

Re: Outlook OAUTH issues

Post by DarkNexxus »

Only errors I get are these.

--- Version ---
OS: Windows 11 (x64)
POP Peeper: 5.6.3.0
Webmail: 5.1.0.0
SSL: 3.0.16.1
IMAP: 5.6.3.0
PPTweaker: 5.6.3.0
Updater: 1.0.0.0

Program folder: C:\Program Files (x86)\POP Peeper\
Ini file: C:\Program Files (x86)\POP Peeper\poppeeper.ini
Data folder: C:\Users\*****\AppData\Roaming\POP Peeper\

--- Error ---
***** outlook [1000: IMAP] ['outlook.office365.com' (993) SSL: 1] [Smtp: 'smtp.office365.com' (587) SSL: 2] [oauth: 1] [consec: 3] [enabled: 1]
- Oauth2 error ([invalid_grant] AADSTS70000: The user could not be authenticated as the grant is expired. The user must sign in again. Trace ID: 27f3927e-a05a-4834-9178-e67e87ad5400 Correlation ID: df1badc8-7e14-485d-9600-2a0268e814d6 Timestamp: 2025-06-27 16:55:58Z) -- There was a problem connecting to the Oauth2 server. Try again later or reset Oauth2 if the problem persists. Reset Oauth2: pp://OAuth2?TWlzdHkncyBvdXRsb29r Edit account: pp://EditAccount?TWlzdHkncyBvdXRsb29r

****** hotmail [1000: IMAP] ['outlook.office365.com' (993) SSL: 1] [ClientSend: '' (0) SSL: 0] [oauth: 1] [consec: 3] [enabled: 1]
- Oauth2 error ([invalid_grant] AADSTS70000: The user could not be authenticated as the grant is expired. The user must sign in again. Trace ID: ab541c78-c8bf-4d78-b764-52cb4fa71f01 Correlation ID: a32046df-b0ce-49e3-82b9-fbff750efe65 Timestamp: 2025-06-27 16:55:59Z) -- There was a problem connecting to the Oauth2 server. Try again later or reset Oauth2 if the problem persists. Reset Oauth2: pp://OAuth2?ZGF2ZSdzIGhvdG1haWw= Edit account: pp://EditAccount?ZGF2ZSdzIGhvdG1haWw=

The other OAUTH accounts all work fine. I have a few gmail accounts listed in there, along with a one or two domain accounts that I own.
DarkNexxus
Posts: 7
Joined: Fri May 20, 2005 1:09 am

Re: Outlook OAUTH issues

Post by DarkNexxus »

I should add, that if I renew the grant, it works just fine till I reboot/restart again. Then it needs to be authorized again. I don't reboot often, I leave the computer on pretty much 24/7. Power outages and sometimes poor system performance will have me do a restart on the computer. In this case, I posted last night about my issue, then rebooted today to do some updates. So 12 hours in between and it's expired.
User avatar
Jeff
Admin / Developer
Posts: 9441
Joined: Sat Sep 08, 2001 9:46 pm

Re: Outlook OAUTH issues

Post by Jeff »

Did you test that changes you make are being saved? Based on this:
Ini file: C:\Program Files (x86)\POP Peeper\poppeeper.ini
I'm presuming changes would not be saved because POP Peeper cannot write to files in the "Program Files" folder. Therefore, POP Peeper can update your Oauth2 values while in memory, but cannot save them, so once you restart PP, it's using old data.

There's a semi-related FAQ for this; however, in your case, the data folder happens to be correct, it's just your ini file that's in a write-protected folder. So what you need to do is:

1) Exit POP Peeper

2) MOVE the ini file from:
C:\Program Files (x86)\POP Peeper\poppeeper.ini
TO:
C:\Users\*****\AppData\Roaming\POP Peeper\

-> double-check that the ini file is no longer in the listed "Program Files" folder

3) Restart PP

4) You can check the location of the ini file by going to main menu: Tools / Options / Storage
The Ini Location should be under C:\Users\... (and not c:\Program Files...)
DarkNexxus
Posts: 7
Joined: Fri May 20, 2005 1:09 am

Re: Outlook OAUTH issues

Post by DarkNexxus »

I did that. Same thing happened. Both MS accounts have to be re-authorized. I checked the properties on the .ini file, it's not set to read only. I checked the pop peeper folders as well, both were set to read only, I turned them off then restarted again. Still have to reauthorize.
User avatar
Jeff
Admin / Developer
Posts: 9441
Joined: Sat Sep 08, 2001 9:46 pm

Re: Outlook OAUTH issues

Post by Jeff »

Are you saying that you had to re-oauth *1* time or *2* times after fixing things? It would make sense that you'd have to re-oauth ONCE after fixing it, because the data in the file is still expired and then after you re-oauth it could now be properly saved.

If you're saying you did have to do it twice -- if you open File explorer to where the ini file is (tip: you can double-click the text "Ini Location" under Tools / Options / General), is the "date modified" for that file recent?
Post Reply