Microsoft Teams Spoke Refresh Token

Chris Doernbra1
Tera Guru

I have looked through dozens of community articles but I cannot seem to find any answers or solutions around the refresh token. Presently we are required to manually go into the connections within the Integrations section of flow designer and request a new token. This is a problem since it has to be done every 90 days and if we forget our integration is down. There must be a better a way to do this especially since we have to login as both the service account within ServiceNow but also the account in Teams. 

 

What are others out there doing about this? Are we simply stuck with having to request a new refresh token every 90 days manually. Thanks

1 REPLY 1

Laveena-Agarwal
Mega Sage

Hi @Chris Doernbra1 

If you are using OAuth, tokens are stored in the oauth_credential table with expiry information. When it expires, you can run a scheduled script to hit the OAuth token URL (for example: https://microsoft.teams/api/oauth/token).

Meanwhile, if I were you, I would also check with ServiceNow on how they are handling this in their integration offering.

For example, currently I am using "Service Graph Connector for JAMF" — I don’t need to do this step manually. They already have actions and flows which take care of generating refresh tokens and passing them in API calls.