Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

The service provider action failed with error code 'InvalidServiceProviderConnection' and error message 'Provide either a connection string or endpoint for your storage account'

{tocify} $title={Table of Contents}


Issue


In a POC for testing the connectivity to Azure services from Logic App standard workflow developed locally,  created a  workflow which gets triggered by http request, does the transformation to json format and uploads the transformed content in a container as blob.




Tested it locally and it did work absolutely fine.

Next, deployed the project to Azure Logic app and sent a http request via postman to test it.

However, the execution failed.



Bad Request with following Error :

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




Why it happened

Something went missing  after the deployment and as the error points  Provide either a Connection String or endpoint for your storage account.

So missing was connection string to storage account which has the container in which blob is to be written.

I cross checked the local.settings.json in Visual studio code with Logic App->Configuration->Application Settings and found following missing in later.

  "AzureBlob_connectionString": "DefaultEndpointsProtocol=https;AccountName=firstdemo4b7531;
AccountKey=gqYNYbqNxmxsqJMerzFvkTLLkmFB0PXpj/FRGOhhzGqpHp+ASthzaqCg==;
EndpointSuffix=core.windows.net"

And this was implicitly included in local.settings.json file, when I created connection to storage account while designing the workflow.

But it was not moved while deployment.


What to do

Whenever we do deployment of Logic App Standard, we should check if all the settings are reflected in Logic App->Configuration->Application Settings.

It is because only default settings are moved, any thing custom is not moved. And needs to be added explicitly after deployment.

So here we need to add storage account connection string in Application settings of Logic App and save it.


That's all needed, the workflow executed successfully then after.

Note: Application settings are shared by all the workflows in Logic app


This post first appeared on TechFindings, please read the originial post: here

Share the post

The service provider action failed with error code 'InvalidServiceProviderConnection' and error message 'Provide either a connection string or endpoint for your storage account'

×

Subscribe to Techfindings

Get updates delivered right to your inbox!

Thank you for your subscription

×