Skip to content

Add AgenticIdentity API surface#631

Open
heyitsaamir wants to merge 1 commit into
agentic-auth-provider-infrafrom
agentic-api-surface
Open

Add AgenticIdentity API surface#631
heyitsaamir wants to merge 1 commit into
agentic-auth-provider-infrafrom
agentic-api-surface

Conversation

@heyitsaamir

@heyitsaamir heyitsaamir commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Adds RequestOptions to all API methods that support agentic identity and/or service URL override:

  • RequestOptions<K> type — Pick<{ agenticIdentity?, serviceUrl? }, K>
  • agenticIdentityExtension(options) — converts options to HTTP config extensions
  • resolveServiceUrl(defaultUrl, options) — per-call service URL override
  • Updated API methods: activities (create, update, createTargeted, updateTargeted, delete, getMembers), members, meetings, reactions, teams
  • Targeted methods accept RequestOptions<'serviceUrl'> only (no agenticIdentity)

@heyitsaamir

Copy link
Copy Markdown
Collaborator Author

Comment thread packages/api/src/clients/auth.ts Outdated
Comment thread packages/api/src/clients/auth.ts Outdated
@heyitsaamir heyitsaamir marked this pull request as ready for review June 26, 2026 20:09
@heyitsaamir heyitsaamir force-pushed the agentic-auth-provider-infra branch from 19b5bc3 to 53c5fef Compare June 26, 2026 20:19
@heyitsaamir heyitsaamir force-pushed the agentic-api-surface branch 2 times, most recently from c92e38c to b57702e Compare June 26, 2026 20:29
@heyitsaamir heyitsaamir requested a review from Copilot June 26, 2026 20:30

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 a standardized RequestOptions API surface across the Teams API clients so callers can (a) override serviceUrl per request and (b) pass an agenticIdentity that flows through to the auth provider interceptor via request extensions.

Changes:

  • Introduces RequestOptions, plus helper utilities agenticIdentityExtension() and resolveServiceUrl().
  • Updates multiple client methods (conversations/activities & members, meetings, reactions, teams) to accept optional RequestOptions and thread them into HTTP calls.
  • Updates and extends unit tests to validate option passing (service URL override + agentic identity extensions).

Reviewed changes

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

Show a summary per file
File Description
packages/apps/src/activity-sender.spec.ts Updates expectations to account for the extra (empty) request config object passed through the API client calls.
packages/api/src/clients/team.ts Adds RequestOptions support for team reads and serviceUrl override resolution.
packages/api/src/clients/team.spec.ts Updates tests and adds coverage for serviceUrl override + agentic identity extensions.
packages/api/src/clients/request-options.ts New shared request options types/helpers (agentic identity extensions + serviceUrl resolution).
packages/api/src/clients/reaction/reaction.ts Adds RequestOptions support and forwards agentic identity extensions and serviceUrl override.
packages/api/src/clients/reaction/reaction.spec.ts Updates tests and adds coverage for serviceUrl override + agentic identity extensions.
packages/api/src/clients/meeting.ts Adds RequestOptions support for meeting APIs and forwards agentic identity extensions and serviceUrl override.
packages/api/src/clients/meeting.spec.ts Updates tests and adds coverage for serviceUrl override + agentic identity extensions.
packages/api/src/clients/index.ts Exports the new request-options surface from the clients barrel.
packages/api/src/clients/conversation/members.spec.ts Updates conversation member client tests to include the new request config argument.
packages/api/src/clients/conversation/member.ts Adds RequestOptions support for conversation member APIs and threads options into HTTP calls.
packages/api/src/clients/conversation/index.ts Extends conversation client sub-APIs to accept RequestOptions in their method signatures.
packages/api/src/clients/conversation/activity.ts Adds RequestOptions support for activity APIs, including serviceUrl override resolution and agentic identity extensions (non-targeted).
packages/api/src/clients/conversation/activity.spec.ts Updates tests and adds coverage for serviceUrl override + agentic identity extensions.
packages/api/src/clients/auth.ts Re-exports AGENTIC_IDENTITY_EXTENSION to make it part of the auth surface.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/api/src/clients/index.ts
Comment thread packages/api/src/clients/conversation/activity.ts
Comment thread packages/api/src/clients/conversation/member.ts
Comment thread packages/api/src/clients/conversation/member.ts
Comment thread packages/api/src/clients/conversation/activity.ts
@heyitsaamir heyitsaamir force-pushed the agentic-auth-provider-infra branch from 53c5fef to 0420261 Compare June 26, 2026 21:59
@heyitsaamir heyitsaamir force-pushed the agentic-api-surface branch from b57702e to fbf0cbd Compare June 26, 2026 21:59
@heyitsaamir heyitsaamir force-pushed the agentic-auth-provider-infra branch from 0420261 to 79309bc Compare June 26, 2026 22:03
@heyitsaamir heyitsaamir force-pushed the agentic-api-surface branch from fbf0cbd to c5dfbda Compare June 26, 2026 22:03
@heyitsaamir heyitsaamir requested a review from Copilot June 26, 2026 22:14

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 14 out of 14 changed files in this pull request and generated 3 comments.

Comment thread packages/api/src/clients/request-options.ts
Comment thread packages/api/src/clients/team.ts
Comment thread packages/api/src/clients/team.ts
@heyitsaamir heyitsaamir force-pushed the agentic-auth-provider-infra branch from 79309bc to bdf4270 Compare June 29, 2026 21:26
@heyitsaamir heyitsaamir force-pushed the agentic-api-surface branch from c5dfbda to 76ad125 Compare June 29, 2026 21:26
@heyitsaamir heyitsaamir force-pushed the agentic-auth-provider-infra branch from bdf4270 to ae21553 Compare June 29, 2026 21:33
@heyitsaamir heyitsaamir force-pushed the agentic-api-surface branch from 76ad125 to 3cc0104 Compare June 29, 2026 21:33
`${this.serviceUrl}/v3/conversations/${conversationId}/activities?isTargetedActivity=true`,
params
);
async createTargeted(conversationId: string, params: ActivityParams, options?: RequestOptions<'serviceUrl'>) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

in PY, create_targeted accepts agentic_identity. Is this difference intentional?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@corinagum corinagum left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Encoding path params seems correct, but Teams conversation IDs contain : / @ / ; , so this changes the bytes we send to the connector. Could you confirm the connector accepts %3A / %40 -encoded IDs, (b) apply it consistently, and (c) mirror it in Python?

Targeted methods drop agenticIdentity but Python keeps it. The description says targeted methods are RequestOptions<'serviceUrl'> by design, but Python's create_targeted/update_targeted/delete_targeted do accept agentic_identity and attach the extension. Is the TS asymmetry intentional? If so a one-line note on why would help; if not, we have a cross-SDK gap.

@heyitsaamir heyitsaamir force-pushed the agentic-auth-provider-infra branch from ae21553 to 4bd79dd Compare July 1, 2026 00:03
@heyitsaamir heyitsaamir force-pushed the agentic-api-surface branch from 3cc0104 to 4d38786 Compare July 1, 2026 00:04
@heyitsaamir heyitsaamir force-pushed the agentic-auth-provider-infra branch from 4bd79dd to e61cd55 Compare July 1, 2026 05:31
@heyitsaamir heyitsaamir force-pushed the agentic-api-surface branch from 4d38786 to 6ddcadd Compare July 1, 2026 05:31
@heyitsaamir heyitsaamir force-pushed the agentic-auth-provider-infra branch from e61cd55 to b4b82f7 Compare July 1, 2026 21:39
@heyitsaamir heyitsaamir force-pushed the agentic-api-surface branch from 6ddcadd to 711a6ac Compare July 1, 2026 21:39
@heyitsaamir

Copy link
Copy Markdown
Collaborator Author

Encoding path params seems correct, but Teams conversation IDs contain : / @ / ; , so this changes the bytes we send to the connector. Could you confirm the connector accepts %3A / %40 -encoded IDs, (b) apply it consistently, and (c) mirror it in Python?

Targeted methods drop agenticIdentity but Python keeps it. The description says targeted methods are RequestOptions<'serviceUrl'> by design, but Python's create_targeted/update_targeted/delete_targeted do accept agentic_identity and attach the extension. Is the TS asymmetry intentional? If so a one-line note on why would help; if not, we have a cross-SDK gap.

I'm removing the encoding logic. It seems like something we can pick up separately (if needed).
Python actually doesn't keep agentic ids in its targeted-message functions, so I think we should be okay here?

@heyitsaamir heyitsaamir force-pushed the agentic-api-surface branch 2 times, most recently from bff3ee5 to ef6df69 Compare July 1, 2026 22:57
@heyitsaamir heyitsaamir force-pushed the agentic-auth-provider-infra branch from b4b82f7 to a92c9ad Compare July 1, 2026 23:08
@heyitsaamir heyitsaamir force-pushed the agentic-api-surface branch from ef6df69 to 64922a6 Compare July 1, 2026 23:08
@heyitsaamir heyitsaamir force-pushed the agentic-auth-provider-infra branch from a92c9ad to b965beb Compare July 1, 2026 23:12
@heyitsaamir heyitsaamir force-pushed the agentic-api-surface branch from 64922a6 to b2a0d57 Compare July 1, 2026 23:12
@heyitsaamir heyitsaamir force-pushed the agentic-auth-provider-infra branch from b965beb to c62f6ec Compare July 1, 2026 23:16
@heyitsaamir heyitsaamir force-pushed the agentic-api-surface branch from b2a0d57 to 56bb113 Compare July 1, 2026 23:16
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.

3 participants