Friday Fact: Missing Environment Variables Can Break Your Logic App Standard Workflows

Just like in Azure Functions, where environment variables need to be correctly set, the same applies when working with Logic App Standard in Visual Studio Code.

Let’s walk through an example:

When connecting to a blob container, you’re prompted to fill in some fields, such as:

  • Connection Name
  • Authentication Type (we select “Storage Account Connection String”)
  • Storage Account Connection String

After retrieving the connection string from the storage account, we complete the connection setup.

Now, In Visual Studio Code, within your project, similar to Logic App Consumption, you will have a local.settings.json file. If you open this file, you’ll see your connection string is stored there.

Additionally, if you check the connections.json file, you’ll find that this value is referenced as an app setting.

However, once you deploy your Logic App to the Azure Portal and run it, you’ll likely encounter the following error in the blob connector:

{ "code": "ServiceProviderActionFailed", "message": "The service provider action failed with error code 'InvalidServiceProviderConnection' and error message 'Provide either a connection string or endpoint URL for your Azure storage account.'." }

To fix this, you’ll need to add the environment variable in your Logic App.

Ensuring it matches the name used in your Visual Studio Code project, and assign it the same value.

Once you’ve applied this change, you can test your Logic App again—this time, you’re aiming to see green!

To lazy to read? We’ve got you covered! Check out our video version of this content!

Hope you find this helpful! If you enjoyed the content or found it useful and wish to support our efforts to create more, you can contribute towards purchasing a Star Wars Lego for Sandro’s son!

Author: Luis Rigueira

Luis Rigueira is a Enterprise Integration Consultant at DevScope

Leave a Reply

Your email address will not be published. Required fields are marked *

turbo360

Back to Top