Repository navigation
Release 2.1.1: backport Entra caller app validation - #635
Merged
Mehak Bindra (MehakBindra) merged 2 commits intoOct 16, 2026
Merged
Conversation
## Summary Inbound activities authenticated with an Entra (Agent ID) token are now accepted only when the token was requested by the Agent 365 platform. The caller app is read from `azp`, or from `appid` when `azp` is absent (v1 tokens), and compared case-insensitively. Tokens from any other client app are rejected with 401. Bot Framework tokens are unaffected. ## Changes `TokenValidator` checks the caller app after Entra token validation succeeds and raises `jwt.InvalidTokenError` on mismatch. A disallowed caller app is logged at warning level, matching TS and .NET. ## Behavior change Entra-authenticated activities sent from any app other than the Agent 365 platform (for example, a custom client or another bot calling the bot's endpoint directly with an Entra token) now receive 401. ## Testing - Unit tests for allowed `azp`, allowed `appid`, case-insensitive match, `azp` precedence, disallowed `azp`, disallowed `appid`, missing caller claims, and Bot Framework tokens unaffected. - Verified locally end to end: an Entra token from a different app registration with the bot as audience returns 401, and the activity is not processed. --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> (cherry picked from commit 9d19ac8)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 75921e14-a409-4a9a-bb03-08659dc023de
Corina (corinagum)
approved these changes
Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
version.jsonfrom2.1.0to2.1.1.Validation
Release instructions
RELEASE.md.2.1.1and manually run the Azure DevOps publish pipeline onrelease/v2.1with Publish Type: Public and required approval.v2.1.1GitHub release.v2.1.0.No publishing is triggered by this PR.