Monday, July 12, 2021

Get secret value from key vault in azure logic app

 

In this blog we are going to extend our last logic app. Azure provide seamless connectivity with in azure other services. Getting key from the key-vault is quite easy in logic app, we might have some requirement where we have to get the keys or token in order to call other service.

 

 



 

  • Open the exiting logic app which was created here and click on edit to modify it.
  • Click “+ New Step

 

 



 

  • Search Key Vault in text box if does show in recent search.

 



  • Login your Key vault and it will create an API connection. Type your Keyvault name if you have multiple subscription. If you don’t choose then it might give you 400 Bad Request error.

 



 

  • Choose action “Get Secret” as shown below


 


 

  • If logic is successful, then it will give us list of secrets that we created.

 



 

  • Choose the “secret-key-test” we created in last blog, this one we will try to access.

 


 


Save the logic app and try to run this. In our case we have created a event based trigger, so I will upload a file which will trigger this logic app and we can then see the secret value.

After uploading the file, Logic APP has been triggered and in run history we can see the value of the secret which was fetch in Logic APP from the Azure Key Vault.

 



 

No comments:

Post a Comment