Why am I getting a 401 Unauthorized error when reconnecting to Microsoft integration with the same account in Pipedream's OAuth setup?

This topic was automatically generated from Slack. You can find the original thread here.

Hey team :wave:
I’m working on a Microsoft integration using these scopes:
User.Read email offline_access openid profile Files.Read Files.Read.All Files.ReadWrite Calendars.Read Calendars.Read.Shared Calendars.ReadWrite Calendars.ReadWrite.Shared Directory.ReadWrite.All Notes.ReadWrite.All Team.ReadBasic.All Mail.Send Sites.ReadWrite.All People.Read OnlineMeetingRecording.Read.All OnlineMeetings.ReadWrite
It connects successfully the first time with my Microsoft organizational account, but when I try to reconnect with the same account, I get a 401 Unauthorized error.
Has anyone run into this before? Could it be related to token caching, consent, or tenant-level permissions? Any tips on how to debug this in Pipedream’s OAuth setup would be appreciated

sometimes i get this error instead of 401