I’m running into an issue with a generic OAuth2 credential in n8n connected to a Microsoft Azure Entra app (not the native Microsoft/Outlook credential).
After connecting, everything works fine initially, but within ~30 minutes the credential becomes completely disconnected and I have to authenticate again. It doesn’t behave like a normal token refresh — the authorization itself appears to be dropped.
What’s confusing is that when our IT admin tested the same OAuth flow locally, access and refresh tokens were handled correctly without any unexpected disconnects. Because of this, it seems like the issue may be specific to how n8n is managing the OAuth session or refresh process.
Has anyone experienced something similar with generic OAuth2 credentials? Any guidance on settings, refresh behavior, token lifetime, or logs to check would be greatly appreciated.
There isn’t a confirmed n8n bug specific to generic OAuth2 with Microsoft Entra. From similar cases, this usually points to token or refresh-token behavior on the provider side rather than n8n itself.
If possible, I’d recommend trying the built-in Microsoft Entra ID credential first, since it uses a known and well-tested flow. Also worth checking whether your Entra app is actually issuing a refresh token and whether any Conditional Access policies are forcing re-authentication (which could explain the 30-minute disconnect).
If you can share sanitized details of your OAuth2 credential or confirm whether a refresh token is being stored, that would help narrow it down further.