Teams error resourcematchfailed: SSO token exchange resource does not match the app ID URI
Last verified against Microsoft Learn - Status codes from bot conversational APIs
Resource match failedWhat error resourcematchfailed means
Teams tried bot single sign-on and gave up because the identifiers didn't line up. When SSO fails, Teams sends your bot a signin/failure invoke activity carrying a code and message; this code is documented as "The token exchange resource URI on the OAuthCard does not match the Application ID URI in the Entra app registration's 'Expose an API' section," flagged as common and silent. The SDK's default handler logs it as resourcematchfailed -- Resource match failed.
Silent means the user sees nothing: no error, no sign-in, just a bot that never gets a token. The fix lives in configuration, and Microsoft lists every value that has to agree: the Application ID URI under Expose an API (typically api://<Your-Application-Id>), an access_as_user scope, the Teams desktop and web clients as pre-authorized client applications, the Token Exchange URL on the Azure Bot OAuth connection, and webApplicationInfo.resource in the app manifest.
If you don't need SSO, Microsoft's tip is to leave the Token Exchange URL blank, which keeps the standard sign-in button flow.
What it looks like
// Invoke activity Teams sends to the bot
{
"type": "invoke",
"name": "signin/failure",
"value": {
"code": "resourcematchfailed",
"message": "Resource match failed"
}
}
// Default SDK log line
Sign-in failed for user "..." in conversation "...": resourcematchfailed -- Resource match failedWhy it happens
- The Token Exchange URL on the OAuth connection differs from the Application ID URI.
- webApplicationInfo.resource in the manifest doesn't match the Application ID URI.
- No Application ID URI is set under Expose an API.
- The access_as_user scope or the Teams client pre-authorizations are missing.
How to fix Teams error resourcematchfailed
- 1Copy the Application ID URI from Expose an API and paste the same string into the OAuth connection's Token Exchange URL.
- 2Set webApplicationInfo.resource in the manifest to that URI, then re-upload the app package.
- 3Add the access_as_user scope and pre-authorize the Teams desktop (1fec8e78-bce4-4aaf-ab1b-5451cc387264) and web (5e3ce6c0-2b1f-4285-8d4b-75ee78787346) client IDs.
- 4Register a signin/failure handler that logs code and message so silent failures become visible.
How to stop it recurring
Generate the Application ID URI, the Token Exchange URL, and the manifest's webApplicationInfo.resource from a single value in your provisioning scripts. Run that script in every environment instead of editing values by hand in three portals. Always log signin/failure activities, since most SSO failure codes are silent in the Teams client.
Official reference: Microsoft Learn - Status codes from bot conversational APIs. See all Teams error codes or the Teams limits and quotas.
Related codes
- installedappnotfound: SSO failed because the bot app is not installedThe bot app is not installed for the user or group chat.
- tokenmissing: SSO failed because Entra token acquisition failedAAD token acquisition failed.
- authrequestfailed: SSO auth request failed after app installFailed to handle SSO auth request
- AADSTS50011: Redirect URI mismatch in bot sign-inInvalidReplyTo - The reply address is missing, misconfigured, or doesn't match…
Error resourcematchfailed - quick answers
What does Teams error resourcematchfailed mean?
Teams tried bot single sign-on and gave up because the identifiers didn't line up. When SSO fails, Teams sends your bot a signin/failure invoke activity carrying a code and message ; this code is documented as "The token exchange resource URI on the OAuthCard does not match the Application ID URI in the Entra app registration's 'Expose an API' section," flagged as common and silent.
How do I fix Teams error resourcematchfailed?
1. Copy the Application ID URI from Expose an API and paste the same string into the OAuth connection's Token Exchange URL. 2. Set webApplicationInfo.resource in the manifest to that URI, then re-upload the app package. 3. Add the access_as_user scope and pre-authorize the Teams desktop (1fec8e78-bce4-4aaf-ab1b-5451cc387264) and web (5e3ce6c0-2b1f-4285-8d4b-75ee78787346) client IDs. 4. Register a signin/failure handler that logs code and message so silent failures become…
Stop debugging Teams by hand
Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.