Authorization failed in new Microsoft Entra ID node

Describe the problem/error/question

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.

What is the error message (if any)?

401

Please share your workflow

I shared screenshot, the flow is only the Entra Node with a webhook connected.

Information on your n8n setup

  • n8n version: 1.75.2
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): main
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • Operating system: linux

Someone that can help please? or does anyone know this is a n8n bug?

@n8n team anyone that can help me?

I am facing the same issue with the Microsoft Entra Node, looks like the session it is only being keept by 1 hour.

Anyone of the n8n team that can help?

hey, did you find a solution,

I am facing the same issue, it seems that the token is not refreshing…

Have you added the offline scope?
Without that the refresh token will be missing and the refresh will fail.

Well the thing is that the same credential works in the HTTP node and not in the Entra ID node.

And in the Microsoft Entra ID credential it is not possible to add scopes.

Hey,

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. :sweat_smile:

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.

1 Like

Facing the same issue. Have not been able to resolve this

The work around for this problem is simple, just use the HTTP node and just manually add the info.

But if there is a node for Entra ID is should work @n8n
It would be great if someone of the n8n team can respond to this as well.

same issue here..any update / fix regarding the node??

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.