Skip to content

Normalize connection auth AgenticIdentity to ARM-required AgenticIdentityToken#8512

Merged
trangevi merged 5 commits into
mainfrom
copilot/fix-agenticidentitytoken-auth
Jun 1, 2026
Merged

Normalize connection auth AgenticIdentity to ARM-required AgenticIdentityToken#8512
trangevi merged 5 commits into
mainfrom
copilot/fix-agenticidentitytoken-auth

Conversation

Copilot AI commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

agent.yaml allowed AgenticIdentity, but ARM connection provisioning only accepts AgenticIdentityToken, creating a validation/provisioning dead end. This change makes both values accepted in config while ensuring generated provisioning config uses the ARM-compatible value.

  • Schema compatibility

    • Added AgenticIdentityToken to schemas/azure.ai.agent.json authType enum.
    • Updated the audience field description to include AgenticIdentityToken.
  • Provisioning normalization

    • Added NormalizeConnectionAuthType in agent_yaml to canonicalize legacy AgenticIdentity to AgenticIdentityToken.
    • Applied normalization when extracting:
      • connection resources from manifest
      • toolbox-derived external tool connections
      • credentials.type fallback when authType is omitted
  • Backward compatibility intent

    • Kept AgenticIdentity accepted as input for existing manifests.
    • Emitted AgenticIdentityToken for management-plane connection creation paths.
func NormalizeConnectionAuthType(authType AuthType) AuthType {
	if authType == AuthTypeAgenticIdentity {
		return AuthTypeAgenticIdentityToken
	}
	return authType
}

Copilot AI and others added 2 commits June 1, 2026 17:26
Co-authored-by: trangevi <26490000+trangevi@users.noreply.github.com>
Co-authored-by: trangevi <26490000+trangevi@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix AgenticIdentityToken acceptance for connection auth Normalize connection auth AgenticIdentity to ARM-required AgenticIdentityToken Jun 1, 2026
Copilot AI requested a review from trangevi June 1, 2026 17:28
@trangevi
trangevi marked this pull request as ready for review June 1, 2026 17:36
Copilot AI review requested due to automatic review settings June 1, 2026 17:36
@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

📋 Prioritization Note

Thanks for the contribution! The linked issue isn't in the current milestone yet.
Review may take a bit longer — reach out to @rajeshkamal5050 or @kristenwomack if you'd like to discuss prioritization.

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

This PR addresses a compatibility gap where agent.yaml allowed AgenticIdentity, but ARM connection provisioning requires AgenticIdentityToken, by accepting both inputs while normalizing emitted/provisioned connection auth types to the ARM-compatible value.

Changes:

  • Extended the JSON schema authType enum and audience description to include AgenticIdentityToken.
  • Added NormalizeConnectionAuthType to canonicalize legacy AgenticIdentityAgenticIdentityToken.
  • Applied auth-type normalization when extracting toolbox-derived tool connections and manifest connection resources, with accompanying unit tests.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
cli/azd/extensions/azure.ai.agents/schemas/azure.ai.agent.json Adds AgenticIdentityToken to the Connection.authType enum and updates audience description.
cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/yaml.go Introduces AuthTypeAgenticIdentityToken and normalization helper for provisioning compatibility.
cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/yaml_test.go Adds unit test coverage for NormalizeConnectionAuthType.
cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/parse_test.go Extends auth-type coverage test cases to include AgenticIdentityToken.
cli/azd/extensions/azure.ai.agents/internal/cmd/init.go Normalizes auth types when extracting toolbox tool connections and connection resources.
cli/azd/extensions/azure.ai.agents/internal/cmd/init_test.go Adds tests asserting auth-type normalization during extraction.

Comment thread cli/azd/extensions/azure.ai.agents/schemas/azure.ai.agent.json
Comment thread cli/azd/extensions/azure.ai.agents/internal/cmd/init.go Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added the ext-agents azure.ai.agents extension label Jun 1, 2026
Co-authored-by: trangevi <26490000+trangevi@users.noreply.github.com>
@trangevi
trangevi enabled auto-merge (squash) June 1, 2026 17:53
@trangevi

trangevi commented Jun 1, 2026

Copy link
Copy Markdown
Member

/check-enforcer override

@trangevi
trangevi merged commit f47e0c6 into main Jun 1, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ext-agents azure.ai.agents extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AgenticIdentityToken not accepted for connection auth

4 participants