Add Agent 365 token support#628
Open
heyitsaamir wants to merge 1 commit into
Open
Conversation
Collaborator
Author
|
This change is part of the following stack: Change managed by git-spice. |
This was referenced Jun 26, 2026
a33ab81 to
9961c24
Compare
66a1dec to
96485b1
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds foundational types and plumbing for Agent 365 token scenarios across @microsoft/teams.api and @microsoft/teams.apps, including new agent identity modeling, an extensible token-provider callback shape, and a new TokenManager agentic token acquisition path.
Changes:
- Introduces
AgenticIdentityand exports it from the API models barrel. - Extends auth surface area:
CloudEnvironment.agenticBotScopeandTokenCredentials.token(..., options?: TokenRequestOptions). - Updates
TokenManagerwithgetAppToken(...)andgetAgenticToken(...)plus an@azure/msal-nodeversion bump.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/apps/src/token-manager.ts | Adds getAppToken and implements a 3-step getAgenticToken exchange flow plus new MSAL client caching. |
| packages/apps/src/token-manager.spec.ts | Updates TokenCredentials-provider expectations for the new optional options argument. |
| packages/apps/package.json | Bumps @azure/msal-node dependency version. |
| packages/api/src/models/index.ts | Exports the new agentic-identity model. |
| packages/api/src/models/agentic-identity.ts | Adds the AgenticIdentity type. |
| packages/api/src/auth/credentials.ts | Adds TokenRequestOptions and extends TokenCredentials.token signature to accept options. |
| packages/api/src/auth/cloud-environment.ts | Adds agenticBotScope to CloudEnvironment and populates it for predefined clouds. |
| package-lock.json | Updates lockfile for the MSAL dependency bump. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ada0911 to
7be4e41
Compare
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.
Adds foundational token support for Agent 365 scenarios:
AgenticIdentitytype (agenticAppId, agenticUserId, tenantId, agenticAppBlueprintId)agenticBotScopeonCloudEnvironment(https://botapi.skype.com/.default)TokenRequestOptionstype for extensible token callback optionsTokenManager.getAgenticToken(agenticIdentity, scope)— 3-step FMI token exchange (T1 → T2 → T3)TokenManager.getAppToken(scope, tenantId?)— generalized app token methodTokenCredentials.tokensignature extended:(scope, tenantId?, options?: TokenRequestOptions)