How to get JWT token which is generated in VS Code automatically from Azure Portal for Standard Logic app workflows?

Hitesh Ghori 0 Reputation points
2024-10-05T04:24:54.46+00:00

Setting up logic app and adding storage account connector with VS code generated following parameter file locally and stores jwt token in locall.settings.json file as azureblob-connectionKey.

but there is now way to get/generate key from Azure Portal or any other way. How do you get key?

{
  "azureblob-ConnectionRuntimeUrl": {
    "type": "String",
    "value": "@appsetting('azureblob-ConnectionRuntimeUrl')"
  },
  "azureblob-Authentication": {
    "type": "Object",
    "value": {
      "type": "Raw",
      "scheme": "Key",
      "parameter": "@appsetting('azureblob-connectionKey')"
    }
  }
}

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

1 answer

Sort by: Most helpful
  1. Vinodh247 23,111 Reputation points MVP
    2024-10-06T09:20:27.4533333+00:00

    Hi Hitesh Ghori,

    Thanks for reaching out to Microsoft Q&A.

    In Azure Logic Apps Standard workflows, connections to resources like azure blob storage are handled differently compared to the Consumption model. When developing locally using VS Code, the environment can automatically generate JWT tokens and store them in the local.settings.json file, such as the azureblob-connectionKey. However, when deploying to Azure, there's no straightforward way to generate or retrieve this key directly from the Azure Portal.

    Use Managed Identity for authentication

    The recommended and more secure approach is to use a MI for your Logic App to authenticate with Azure services like Blob Storage. This method eliminates the need to handle connection keys manually and leverages AAD for secure access.

    Advantages of Using Managed Identity:

    • Security: Eliminates the need to store and manage connection keys or secrets.
    • Simplicity: Streamlines authentication by using AAD.
    • Maintainability: Reduces overhead in managing credentials across different environments.

    Additional Notes:

    • If you must use a connection key for some reason, you would typically generate it by creating an API connection resource via ARM templates or azure CLI scripts. However, this is more complex and less secure than using MI.
    • Always ensure that your Logic App and the resources it needs to access are in the same AAD tenant to use MI auth effectively.

    Please 'Upvote'(Thumbs-up) and 'Accept' as an answer if the reply was helpful. This will benefit other community members who face the same issue.

    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.