1

We recently started working on Azure logic app (Standard) and ran into some problems when inserting some data to a normal Azure Table Storage.

Service: Azure logic app (Standard)

Function that are failing: Insert or Update Entity (Table storage)

Error message: {"statusCode":"InternalServerError","body":{"code":"ServiceProviderActionFailed","message":"The service provider action failed with error code 'ServiceOperationFailed' and error message 'Object reference not set to an instance of an object.'."}}

The objects that are beeing passed to the function all have the same structure, however, some of them are failing and returning the error written above.

Eric Qvarnström
  • 779
  • 6
  • 21

3 Answers3

1

After debugging for a while we concluded that the Managed Identity was the problem. When switching to a normal Connection-string to the table storage, the function worked fine and all the data was submitted.

The function is at the moment in Preview mode, so there maybe still are some unknown bugs with it.

Eric Qvarnström
  • 779
  • 6
  • 21
  • 1
    From the documentation, Azure table storage is supposed to work with managed identity and logic app standard: https://learn.microsoft.com/en-us/azure/logic-apps/create-managed-service-identity?tabs=standard – Thomas Oct 17 '22 at 01:51
  • 1
    @Thomas I did see that as well, but for some reason, some of the requests I made to the table storage (when using managed identity) got an internal server error. So seems like something is not working as intended. – Eric Qvarnström Oct 17 '22 at 10:31
  • @EricQvarnström We're having similar issues, but when merely accessing a Storage Table (getting an entity) inside a for each loop in a Logic Apps standard workflow using managed identities. The number of faults of the type "Object reference not set to an instance of an object" increases the harder we push the workflow, i.e. for us it seems related to how heavy the load is on the table. – Linus Proxy Nov 21 '22 at 13:19
  • We too are affected by this "bug". According to this roadmap of build-in actions the table storage action with managed identity support is supposed to go GA in Q4 of 2022. https://github.com/Azure/logicapps/discussions/530 – Guido Dec 14 '22 at 15:36
1

As far as I can tell, it's a combination of using Managed Identity with the built-in Logic App Actions for performing operations on Storage Tables, at least in its current state. If you use the "non built-in" actions you won't see this issue.

I saw the same issue the last few days, and in my case my logic apps were merely getting entities rather than inserting. The error in question showed up completely non deterministically, sometimes a payload worked, sometimes the same payload got this error. The only deterministic factor was that the same batches of payloads started out working or mostly working, but the more I ran them, the more of this error I got.

As per your own reply, I tried to temporarily change to a connection string instead of a Managed Identity, and indeed it worked much better, but after changing to the "non built-in" V1 actions (i.e. not V2 which is in preview), it worked fine.

In my case, it seems there's some heavier loads where the built-in Actions with Managed Identity simply doesn't cut it. It's weird that we get a 502 rather than e.g. 429 which we could act upon properly, but it is what it is.

The Logic Apps Designer is unfortunately not very obvious in terms of what type of Action you're using. You switch between the two types when creating an Action in the Logic Apps Designer by clicking either on the tab "Built-in" or the tab "Azure", and to find the non-built in Storage Tables operations you have to specifically write "azure storage tables" in the search box. Leave out one of those words and you won't find it.

enter image description here

Linus Proxy
  • 525
  • 1
  • 5
  • 21
  • 1
    Note that the non-build in actions have an associated cost of 0.000121 cents per call as is described here: https://azure.microsoft.com/en-us/pricing/details/logic-apps/ "For Azure connectors, billing is based on the number of calls. Please note that number of calls may be different than number of action executions. Visit billing documentation for more details." 0.000121 doesn't look like much but depending on your use case it can add up fast. – Guido Dec 22 '22 at 08:53
0

The Managed Identity was the problem and please log support ticket to microsoft.