Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs
Hi Erin Cruz
Based on your scenario, you may review the following points:
- Ensure the
webApplicationInfosection in your Teams app manifest matches your Microsoft Entra app registration exactly. In particular, theidmust be the Application (client) ID, and theresourcemust match the Application ID URI defined under Expose an API. Any mismatch can lead to token acquisition failures or inconsistent behavior across environments. - As an additional check, if the issue occurs intermittently, you may capture and decode the token using jwt.ms when it is successfully returned to confirm it is issued for the expected app and tenant. This can help identify whether there are differences between environments or tenants.
Disclaimer: This link may reference Microsoft-related content but is not hosted on an official Microsoft domain (such as *.microsoft.com). Please note that Microsoft is not responsible for the accuracy, security, or advertising on this site.
- SSO tokens are short-lived and managed by the Teams SDK. In normal scenarios,
getAuthToken()handles token refresh automatically. If you encounter intermittent failures, try invokinggetAuthToken()again at the point of need rather than relying on a previously obtained token.
I hope this helps.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.