Running Logic Apps in Docker

Dhanalakshmi Hariharan 61 Reputation points
2021-06-14T12:09:40.613+00:00

Hi,

I am trying to run the Azure logic app in Docker. My Logic App flow is based http request/response based and implemented in VS code. I will be putting the message into Azure queue(managed connector) once http post is triggered. Logic App is running in docker successfully if not using azure queue connector. If we use any Azure connectors, its not working. So want to know if managed connectors (Azure connectors) will run only if Logic Apps hosted in Azure.
Any points would be helpful.
For your reference... VS code snapshot

105384-image.png

Error while using azure queue connector in Logic App:
{
"status": 400,
"source": "https://logic-apis-southindia.token.azure-apim.net:443/tokens/logic-apis-southindia/8e46fddedcf52a8e/azurequeues/faa3fae734b841a092d9f8150ca277ee/exchange",
"message": "Error from token exchange: Invalid Authorization header. Authorization header is expected in the form 'Bearer token' or 'Key token'."
}
Note: This is working good while running locally from VS code. But not working in docker.

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

Accepted answer
  1. Mike Urnun 9,816 Reputation points Microsoft Employee
    2021-06-20T23:00:28.237+00:00

    Hello @Dhanalakshmi Hariharan

    You'll want to pass in the JWT for the API Connection (for your Azure Queue) which the Put_a_message_on_a_queue action needs in order to talk to Azure Queues service. If you have already tested your workflow successfully prior to containerizing with Docker, you probably have an existing API Connection already so you should find the JWT for it in your local.settings.json file as the value of azurequeues-connectionKey property.

    Copy the value and pass it in your docker run command as an environment variable: docker run -e WEBSITE_HOSTNAME=localhost -e azurequeues-connectionKey=<your JWT for Azure Queues> -p 8080:80 local/workflow

    This will get your workflow up and running in Docker as a quick test, but afterwards, you'll definitely want to set up your Docker project such that your secrets and JWTs are better handled in a more secure way.

    I found the README on the following to be helpful: https://github.com/Azure/logicapps/tree/master/azure-devops-sample#api-connections

    I hope this helps, let me know if you run into issues or have any further questions.

    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.