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 / Power Automate / new Microsoft Datavers...
Power Automate
Suggested Answer

new Microsoft Dataverse connection using a service principal

(0) ShareShare
ReportReport
Posted on by 8

We created a new Microsoft Dataverse connection using a service principal with a hardcoded client secret. This helps avoid password resets by the Infra team.

We would like to know if there is any way for the Dataverse connection to read the client secret dynamically from either:

  • Azure Key Vault, or
  • a CRM Environment Variable with Secret type

Our aim is to avoid hardcoding the client secret. The Infra team changes the secret regularly (for example, monthly), and we want the Dataverse connection using the service principal to automatically pick up the new secret and continue working without manual reconfiguration.

Questions

  1. Is it possible for a Dataverse connection to read the client secret directly from Azure Key Vault?
  2. Is it possible to use a Dataverse Environment Variable (Secret type) for this?
  3. Are there any other recommended approaches to make the client secret dynamic, so that when Infra rotates the secret, the connection continues to work automatically?

Any guidance or best practice would be appreciated.

Microsoft_Dataverse_Connection.png
Categories:
I have the same question (0)
  • Suggested answer
    Sajeda_Sultana Profile Picture
    221 on at
     
    At the moment, this isn’t supported directly.
     
    When you create a Dataverse connection using a service principal, you must enter the Client ID, Client Secret, and Tenant ID. The client secret is then saved as part of that connection.
     
    The connection cannot automatically read or refresh the secret from:
    • Azure Key Vault
    • A Dataverse Environment Variable with the Secret data type
    Secret environment variables can be used inside apps, flows, or custom integrations, but they cannot be used to authenticate or automatically update the Dataverse connection itself.
     
    So, when the Infra team rotates the client secret, the Dataverse connection will also need to be updated or recreated with the new secret. You can automate that process through an Azure DevOps pipeline, deployment script, or Power Platform API, but the connection will not automatically pick up the new secret on its own.
     
    ✅ 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  @Sajeda_Sultana
     
     
  • PP-25030432-0 Profile Picture
    8 on at
    Thanks. Automate that process through an Azure DevOps pipeline, deployment script, or Power Platform API, Please share the automation code using Power Platform API

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 306 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 169 Super User 2026 Season 2

#3
Haque Profile Picture

Haque 131 Super User 2026 Season 2

Last 30 days Overall leaderboard