Skip to content

Conversation

@trangevi
Copy link
Member

@trangevi trangevi commented Jan 7, 2026

If a project-id is provided, retrieve an existing Application Insights connection if exists

Signed-off-by: trangevi <trangevi@microsoft.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds functionality to retrieve Application Insights connection credentials from Microsoft Foundry projects. When a project-id is provided, the extension now fetches existing Application Insights connections with their credentials and configures them for the agent.

Key changes:

  • Added a new API method GetConnectionWithCredentials to fetch connection details including sensitive credentials
  • Enhanced connection filtering to detect and process Application Insights connections separately
  • Implemented user prompts for selecting or manually entering Application Insights connection strings when multiple connections exist or none are found

Reviewed changes

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

File Description
cli/azd/extensions/azure.ai.agents/internal/pkg/azure/foundry_projects_client.go Added GetConnectionWithCredentials method to retrieve connections with credentials via POST endpoint; added Key field to BaseCredentials struct to store credential keys
cli/azd/extensions/azure.ai.agents/internal/cmd/init.go Enhanced connection filtering to handle Application Insights connections; added logic to retrieve credentials, prompt users for selection when multiple connections exist, and set the APPLICATIONINSIGHTS_CONNECTION_STRING environment variable

Copy link
Contributor

Copilot AI commented Jan 7, 2026

@trangevi I've opened a new pull request, #6470, to work on those changes. Once the pull request is ready, I'll request review from you.

Signed-off-by: trangevi <trangevi@microsoft.com>
@trangevi trangevi merged commit 823f01e into main Jan 7, 2026
18 checks passed
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.

[ai agent extension] azd ai agent init -p should grab appinsights connection to populate env var

3 participants