Bad Gateway when trying to access Azure Key Vault

ADM Henrik Halmstrand 20 Reputation points
2023-05-13T10:51:44.14+00:00

Hi,

I get a bad gateway error when trying to get Azure KeyVault secret from a Power Automate flow. The flow is cloud based and there is no on-premises gateway. The account is a service principal and has Get permission to the secret using an access policy.

Regards

/Henrik

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,451 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vahid Ghafarpour 23,385 Reputation points Volunteer Moderator
    2023-05-13T23:26:20.7266667+00:00

    There are a few potential causes and troubleshooting steps you can take:

    • Validate the Azure Key Vault connection: Double-check that the connection to the Azure Key Vault in your Power Automate flow is properly established. Ensure that the connection is active and valid. You can verify this by navigating to the "Data" tab in your Power Automate flow, selecting the Azure Key Vault connector, and confirming that the connection is successful.
    • Verify the access policy for the service principal: Make sure that the service principal used by your Power Automate flow has the appropriate permissions to retrieve the secret from Azure Key Vault. Confirm that the service principal has the "Get" permission assigned to it through an access policy in the Azure Key Vault.
    • Check for the correct secret name and version: Ensure that you are specifying the correct secret name and version when retrieving the secret in your Power Automate flow. Double-check that the secret name and version match the ones stored in Azure Key Vault.
    • Review Azure Key Vault firewall and virtual network settings: If you have configured firewall rules or virtual network service endpoints for your Azure Key Vault, verify that they are properly configured to allow access from the Power Automate cloud environment. If necessary, adjust the firewall rules or virtual network settings accordingly.
    • Monitor Azure Key Vault diagnostics logs: Enable diagnostics logging for your Azure Key Vault and review the logs to identify any potential issues or errors that could be causing the "Bad Gateway" error. The logs can provide valuable insights into the specific problem you are encountering.
    • Check for temporary service disruptions: Occasionally, there might be temporary service disruptions or issues with Azure Key Vault or the Power Automate service. Visit the Azure status page (status.azure.com) or the Power Platform service health page (admin.powerplatform.microsoft.com) to check if there are any ongoing service incidents or outages that could be affecting your flow.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.