web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Parameterizing Applica...
Copilot Studio
Answered

Parameterizing Application Insights Connection String in Copilot Studio for CI/CD Deployments

(1) ShareShare
ReportReport
Posted on by 20

Hi Community,

 

I have a question regarding Application Insights configuration in Copilot Studio.

Currently, when configuring telemetry for a Copilot Studio agent, the Application Insights connection string is entered manually in Settings → Advanced → Application Insights. During solution migration, I've noticed that the connection string is not retained or cannot easily be managed across environments.

We are planning to implement a CI/CD process for Copilot Studio solution deployments across Dev, Test, and Production environments. To support this, we'd like to parameterize the Application Insights configuration in a similar way to other environment-specific settings.

  1. Is there a supported way to store the Application Insights connection string in a Power Platform Environment Variable and have Copilot Studio reference it automatically?

  2. If not, what is the recommended ALM/CI-CD approach for managing environment-specific Application Insights connection strings?

  3.  

From the Microsoft documentation, I can see that the connection string is configured directly in the agent settings, but I haven't found guidance on parameterizing it for automated deployments.

Any insights, recommendations, or experiences would be greatly appreciated.

Thanks in advance!

I have the same question (0)
  • Verified answer
    11manish Profile Picture
    3,749 on at
    No — Copilot Studio does not currently support automatically reading the Application Insights connection string from a Power Platform Environment Variable.
    The recommended ALM approach is to manage the connection string externally (Environment Variable or Key Vault) and apply the environment-specific value as a post-deployment configuration step in your CI/CD pipeline.
  • Verified answer
    Valantis Profile Picture
    6,939 on at
     
    no native environment variable support for the Application Insights connection string in Copilot Studio settings.
     
    Confirmed from Microsoft docs: <cite index="93-1">Copilot Studio includes a few specific items that aren't solution-aware. These items don't follow the normal solution deployment process and require post-deployment steps on the downstream environment.</cite> Application Insights connection string is one of these items.
     
    The recommended ALM approach:
     
    1. Store the connection string in an environment variable (Secret type for security) in each environment
    2. In your CI/CD pipeline, after solution import, add a post-deployment step using Power Platform CLI to update the Copilot Studio agent's Application Insights setting. You can use the pac copilot command or the Power Platform Build Tools task to patch the agent's configuration
    3. Alternatively, use a Power Automate flow triggered post-deployment that reads the environment variable and updates the agent settings via the Copilot Studio management API
     
    For the deployment settings file approach, <cite index="98-1">use pac solution create-settings to generate a deployment settings JSON file, populate it with environment-specific values, and use it in your pipeline's import step.</cite> This handles connection references and environment variables that are solution components, but the Application Insights string still needs a separate post-deployment configuration step since it's stored as agent metadata, not as a solution component.
     
     
      Best regards,

    Valantis   ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/ 💼 LinkedIn ▶️ YouTube

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
sannavajjala87 Profile Picture

sannavajjala87 160 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 145

#3
Haque Profile Picture

Haque 121

Last 30 days Overall leaderboard