Skip to content

Add Agent 365 token support#628

Open
heyitsaamir wants to merge 1 commit into
agent365-featurefrom
agent365-token-support
Open

Add Agent 365 token support#628
heyitsaamir wants to merge 1 commit into
agent365-featurefrom
agent365-token-support

Conversation

@heyitsaamir

@heyitsaamir heyitsaamir commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Adds foundational token support for Agent 365 scenarios:

  • AgenticIdentity type (agenticAppId, agenticUserId, tenantId, agenticAppBlueprintId)
  • agenticBotScope on CloudEnvironment (https://botapi.skype.com/.default)
  • TokenRequestOptions type for extensible token callback options
  • TokenManager.getAgenticToken(agenticIdentity, scope) — 3-step FMI token exchange (T1 → T2 → T3)
  • TokenManager.getAppToken(scope, tenantId?) — generalized app token method
  • TokenCredentials.token signature extended: (scope, tenantId?, options?: TokenRequestOptions)

@heyitsaamir

Copy link
Copy Markdown
Collaborator Author

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 AgenticIdentity and exports it from the API models barrel.
  • Extends auth surface area: CloudEnvironment.agenticBotScope and TokenCredentials.token(..., options?: TokenRequestOptions).
  • Updates TokenManager with getAppToken(...) and getAgenticToken(...) plus an @azure/msal-node version 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.

Comment thread packages/apps/src/token-manager.ts
Comment thread packages/apps/src/token-manager.ts Outdated
Comment thread packages/apps/src/token-manager.ts Outdated
Comment thread packages/apps/src/token-manager.ts
Comment thread packages/apps/src/token-manager.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.

Comment thread packages/apps/src/token-manager.ts Outdated
Comment thread packages/apps/src/token-manager.ts Outdated
Comment thread packages/apps/src/token-manager.ts
Comment thread packages/api/src/auth/credentials.ts
Comment thread packages/apps/src/token-manager.ts
@heyitsaamir heyitsaamir force-pushed the agent365-token-support branch from ada0911 to 7be4e41 Compare June 29, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants