Skip to main content

Notifications

Power Automate - Using Flows
Answered

bad request- Azure key vault

Posted on by 93

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

  • danru Profile Picture
    danru 93 on at
    Re: bad request- Azure key vault

    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

  • Verified answer
    Linn Zaw Win Profile Picture
    Linn Zaw Win 3,000 on at
    Re: bad request- Azure key vault

    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.

     

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,487

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,014

Leaderboard

Featured topics

Restore a deleted flow