How a connection can get client secret value from GetSecret Action?

Merin Mary 20 Reputation points
2024-07-22T19:57:09.8933333+00:00

I am creating a Logic App and have a 'GetSecret' action to retrieve a secret from Azure Key Vault. In the next step, I need to create a connection to another tenant using a service principal, which requires the client secret obtained from the previous step. How can I pass the secret value retrieved by the 'GetSecret' action to the connection setup in the following step?

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,312 questions
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,201 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Azar 22,870 Reputation points MVP
    2024-07-22T20:03:03.9533333+00:00

    Hi there Merin Mary

    Thanks for using QandA platform

    i guess to pass the client secret retrieved by the 'GetSecret' action in your Logic App to the connection setup in the next step, you can directly reference the secret's value from the 'GetSecret' action. In the subsequent step, such as an HTTP action to set up the connection, use dynamic content to include the secret. For example, in the body of your HTTP request, set "client_secret": "@{actions('GetSecret').outputs.body.value}".

    If this helps kindly ccept the response thanks much.


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.