feat(azure.ai.agents): add RemoteA2A kind, OAuth2 + identity auth types#8327
Merged
Conversation
Add support for RemoteA2A connection kind and expand auth type coverage for connection create command. Kind alias: - Add remote-a2a -> RemoteA2A in normalizeKind() OAuth2 (ARM SDK): - Wire OAuth2AuthTypeConnectionProperties with --client-id/--client-secret flags - Validate OAuth2 flags are only used with --auth-type oauth2 Identity auth types (raw REST, no ARM SDK structs): - UserEntraToken with --audience flag - ProjectManagedIdentity (no credentials) - AgenticIdentityToken via --auth-type agentic-identity (normalizes name) - New raw_connection.go with rawCreateConnection() using runtime.NewRequest PUT Validation: - --client-id/--client-secret rejected for non-oauth2 auth types - --audience rejected for non-identity auth types All auth types POC tested against live workspace (hosted-agents-bugbash). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Nathandrake229
requested review from
JeffreyCA,
therealjohn,
trangevi and
trrwilson
as code owners
May 22, 2026 11:33
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the azure.ai.agents connection create flow to support additional connection kinds/auth types that aren’t fully represented in the current ARM Go SDK, including a new remote-a2a kind alias and new auth-type options.
Changes:
- Added
remote-a2a→RemoteA2Anormalization and expanded auth type normalization (OAuth2 + identity-based types). - Added OAuth2 support in the typed ARM SDK path via
--client-id/--client-secretand associated validation. - Introduced a raw REST
PUTpath (raw_connection.go) for identity auth types not covered by the ARM SDK structs.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
cli/azd/extensions/azure.ai.agents/internal/connections/cmd/raw_connection.go |
Adds raw REST connection create implementation and helpers for metadata parsing. |
cli/azd/extensions/azure.ai.agents/internal/connections/cmd/context.go |
Extends resolved context to include subscription ID + credential for raw REST calls. |
cli/azd/extensions/azure.ai.agents/internal/connections/cmd/connection.go |
Wires new flags/validation, routes create to raw REST for identity auth types, and adds OAuth2 typed support + new kind/auth normalizers. |
cli/azd/extensions/azure.ai.agents/internal/connections/cmd/connection_test.go |
Adds unit tests covering new normalization, OAuth2 request building, raw JSON marshaling, and parseKVMap. |
- URL-escape connection name in raw REST path (url.PathEscape) - Use runtime.NewResponseError for structured error handling - Add warning log for malformed key=value pairs in parseKVMap - Route update through raw REST for identity auth types - Split error message: buildConnectionBody only lists SDK-handled types - Remove unused import Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Nathandrake229
enabled auto-merge (squash)
May 22, 2026 12:12
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
trangevi
approved these changes
May 22, 2026
📋 Prioritization NoteThanks for the contribution! The linked issue isn't in the current milestone yet. |
Member
|
/check-enforcer override |
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.
Add support for RemoteA2A connection kind and expand auth type coverage for connection create command.
Kind alias:
OAuth2 (ARM SDK):
Identity auth types (raw REST, no ARM SDK structs):
Validation:
All auth types POC tested against live workspace (hosted-agents-bugbash).