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 / bad request- Azure key...
Power Automate
Answered

bad request- Azure key vault

(0) ShareShare
ReportReport
Posted on by 95

Hi,

 

My flow uses environment variables which links to Azure key vault to get the API secrets.

 

The Dataverse RetrieveEnvironmentVariableSecretValue action is used by a service account with Azure Key Vault Contributor permissions.

 

The flow was setup and working well for a number of months. 

 

Suddenly I have a number of flows failing on the dataverse action that retrieves the secret from KV giving the reason that the 'user' (service account) hasn't got permissions to access the secret. Nothing changed and it was working before?

 

{
 "error": {
 "code": "0x80040216",
 "message": "Error occured while reading secret: User is not authorized to read secrets from '/subscriptions/...' resource."
 }
}

 

I checked and the service account still has the contributor permission level.

 

What else can I check? Thank you for your help!

 

Regards,

 

Daniel

Categories:
I have the same question (0)
  • Verified answer
    Linn Zaw Win Profile Picture
    2,996 on at

    The point no.5 in the Prerequisites of Configure Azure Key Vault mentioned as below. Can you try Key Vault Secrets User role?

    Azure Key Vault must have the Key Vault Secrets User role granted to the Dataverse service principal.

    Please also go through the other items in the prerequisites and make sure that it aligns with your current set-up.

     

  • danru Profile Picture
    95 on at

    Hi @LinnZawWin ,

     

    Thank you for responding to my post!

     

    I will speak to my IT department to implement and thank you again for your help!

     

    Regards,

     

    Daniel

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 > Power Automate

#1
11manish Profile Picture

11manish 227

#2
David_MA Profile Picture

David_MA 204 Super User 2026 Season 1

#3
Valantis Profile Picture

Valantis 177

Last 30 days Overall leaderboard