Every 8 to 24 hours teams node need to reconnect what is issue,getting no Authorization code

Teams authentication isdue

Hi @suheeldiraksha
It sounds like your Microsoft Teams credential (Microsoft OAuth) is expiring and not refreshing, so n8n asks you to reconnect every few hours.

What is the solution for that.i have tried doing all

Need to fix that issue

  • go to your azure portal (entra id) and find the app registration you made for n8n.
  • go to api permissions > add a permission > microsoft graph > delegated permissions.
  • search for exactly this: offline_access.
  • add it, and make sure to click the grant admin consent button so it actually applies.

How to fix it.tried of doing all

Already it is having offline access

are you using the Teams node to do an action, or are you using the Teams Trigger node to listen for an event?

image

@suheeldiraksha

  1. go into your azure portal and generate a brand new client secret.
  2. go into n8n, completely delete your current microsoft credential, and create a fresh one using that new secret.

if you rebuild it from scratch and the connection still drops tomorrow, the fallback is to build a small scheduled workflow that manually calls the microsoft oauth endpoint to force the token refresh yourself

Already created new credentails still it fails with new secret ,I have tried doing all things

please tell me any solution

since you’re on a docker setup on aws, it’s just n8n’s background worker falling asleep and forgetting to refresh your microsoft token before it expires.

to fix this, you could try to build a tiny “heartbeat” workflow. it basically pokes the microsoft api every hour so it never drops.

  1. create a new, empty workflow.
  2. add a Schedule Trigger node and set it to run every 45 minutes.
  3. add an HTTP Request node right after it.
  4. in the HTTP node, set Authentication to Predefined Credential Type, select Microsoft Teams OAuth2 API, and pick your existing connected credential.
  5. set the URL to: https://graph.microsoft.com/v1.0/me (leave the method as GET).
  6. save it, activate the workflow, and just leave it running in the background.

every 45 minutes, this workflow will makes a tiny request to microsoft. n8n sees the credential being used, checks the expiration, and reliably swaps the token for a fresh one. hopefully your main teams workflows will stop disconnecting.

Looking at your screenshots you’re using the Teams node not the trigger, so the offline_access permission should handle token refresh. Since you already have that added, can you check in Azure Portal under your app registration > Certificates & secrets whether your client secret has expired? That’s usually what causes this when offline_access is already there. Also double check that the redirect URI in Azure exactly matches what n8n is using including the trailing slash if there is one.

Still facing same issue

Still facing same issue after creating this also