Skip to content

[azd ai agent connection] update missing --metadata flag — blocks gateway_connector register-actions #8470

Description

@lindazqli

Summary

azd ai agent connection update currently accepts only --target, --key, and --custom-key. There is no way to add or replace metadata.* on an existing connection.

This blocks the second PUT (register-actions) in the gateway_connector OAuth2 flow, which requires adding metadata.mcpserverConfigProperties to the existing connection so the server can rewrite target to the per-environment Logic Apps gateway URL.

Repro

  1. azd ai agent connection create my-box ... --connector-name box --metadata type=gateway_connector → status Unauthenticated.
  2. Complete user consent via listConsentLinks.
  3. Need to PUT again with metadata.mcpserverConfigProperties = { ... }. No CLI path exists.

Workaround today: azd ai agent connection create my-box --force ... with the full metadata bag re-supplied — fragile and forces users to re-type all top-level fields.

Suggested fix (either)

  1. Add --metadata key=value (repeatable) to azd ai agent connection update, merging into properties.metadata.
  2. Add a dedicated azd ai agent connection register-actions subcommand that wraps PUT Update vscode ext instructions #2 for gateway_connector connections.

(1) is the lower-friction option and also helps other metadata-driven flows (catalog_MCP, toolEntityId, etc.).

Related

  • connection create already has --metadataupdate should mirror it for parity.
  • The catalog_MCP flow for BYO OAuth2 connections (GitHub MCP, etc.) similarly needs metadata wiring on creation; same flag shape would cover both.

Env

  • azd 1.25.2
  • ext azure.ai.agents@0.1.34-preview
  • Verified 2026-05-27/28 against DST projectcgnp (westus2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvementext-agentsazure.ai.agents extension

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions