New Entra ID node credentials fails after couple of hours.
We can reconnect the credential, but in the night when it is schedules the token is expired.
The funny thing is that this only the case at the users endpoint, I have the same flow for groups (with the same credential) and that flow is running every night without problems.
I’ve been looking into this issue too and am facing the same problem. This ONLY happens when using the Schedule trigger, and there is no refresh_token in a client_credentials authentication request.
Normally, n8n should fetch a new access token for each run. However, when using a Schedule trigger, it fails to refresh the token, so it expires after 1 hour.
Is there any way to force n8n to re-authenticate (i.e., request a fresh token) every time the workflow runs?
This seems to be a bug in the client_credentials flow handling in n8n.
Also, why does the client_credentials flow even ask for a user login when validating credentials? That shouldn’t be necessary and doesn’t actually do anything.
Note:
As a workaround, you could create an external scheduler that calls a Webhook instead of using the Schedule trigger directly in n8n. It’s a bit of a crappy solution, but it does work.