Outlook calendar sync failing after OAuth change
Posted
#1
(In Topic #2055)
Trainee

Hi all,
I wrote a small Gambas app to pull my Outlook calendar and mirror it locally. I expected the Microsoft calendar sync to behave once WebDAV / CalDAV was set up, but that’s not what I’m seeing. It imports the events fine the first time, then stops updating completely. This started right after I enabled OAuth on my Microsoft 365 account. Since then I only get 401 errors on the HTTP requests from Gambas. Curl still connects, so the endpoint is alive. I’m no network guru, so I might be missing something obvious. Has anyone here managed a reliable Outlook calendar sync from Gambas?
Posted
Administrator

A few questions…
What have you done to troubleshoot the problem.
Have you tried disabling OAuth for testing?
I'm wondering if it might be a password issue?
Hopefully someone here with network knowledge will drop in and be able to help.
sholzy
Gambas One Site Director
To help make creating posts and using the forum a little easier:
Tutorials - Website and forum and Playground
To report bugs in the Gambas IDE:
Official Gambas Bug Tracker
Gambas One Site Director
To help make creating posts and using the forum a little easier:
Tutorials - Website and forum and Playground
To report bugs in the Gambas IDE:
Official Gambas Bug Tracker
Posted
Trainee

I've verified the credentials and the endpoint URL multiple times. The fact that curl still works suggests the server is fine, but my Gambas implementation is likely failing to pass the OAuth token correctly in the HTTP header. I can't really disable OAuth for testing because Microsoft has been deprecating Basic Auth for Microsoft 365. It's pretty much mandatory now, which is why the old-school password method doesn't work anymore. I suspect I need to better handle the Authorization: Bearer <token> header within my Gambas HttpClient calls for synchronize microsoft calendars. I'll try to debug the exact header string I'm sending vs what curl does. If anyone has a snippet of how they handle token refresh in Gambas, I’m all ears
Posted
Trainee

On user-agent strings, I generally try not to lie in my applications. That said, sometimes you just can't get through unless you look or act like a browser.
1 guest and 0 members have just viewed this.







