How to secure work flow in Azure Logic App

Vardhan Reddy 80 Reputation points
2023-10-05T06:22:46.1866667+00:00

I'm able to create work flow which can create repository in Azure DevOps with HTTP action in Logic App. Actually i have provided base64 encrypted PAT in Header section of HTTP action, this is not secure right. I have tried to store PAT in Key Vault & tried with get secret option in Logic App, but seems something wrong. Can anyone please share the steps how to call PAT from Key vault to Logic App Http action.

FYI: [enter image description here

](https://i.stack.imgur.com/bxatV.png)

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,542 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 70,936 Reputation points Moderator
    2023-10-06T08:48:32.68+00:00

    @Vardhan Reddy Thanks for reaching out.

    You are correct that storing the PAT in the header section of the HTTP action is not secure. It's recommended to use Azure Key Vault to store secrets like PATs and access them securely in your Logic App.

    1. Create an Azure Key Vault and store your PAT as a secret in it. You can follow the instructions in this document to create a Key Vault and store a secret.
    2. In your Logic App, add a "Get Secret" action from the Azure Key Vault connector. You can find this action by searching for "Get Secret" in the search box.
    3. Configure the "Get Secret" action to retrieve the PAT secret from the Key Vault. You will need to provide the Key Vault name, secret name, and version. You can also choose to output the secret value to a variable in your Logic App.
    4. Now use the output of Get Secret action in any of the action.

    In case if you are getting any error please share the screenshoot of your workflow, along with the configuration that you have configured and error message that you are getting.

    Feel free to get back to me if you need any assistance.

    0 comments No comments

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.