Service bus Complete action failing in logic app on VS Code

Sumit Gaur 230 Reputation points
2023-08-29T11:20:28.5033333+00:00

I am using the logic app built-in connector for service to receive a message from a queue in peek lock mode and then after processing the message using the complete action to complete the message to have it removed from the queue, but on the complete action it failed with the following error

"The service provider action failed with error code 'VNetPrivatePortsNotConfigured' and error message 'Using this service provider action in stateful workflows requires VNet integration and the site configuration vnetPrivatePortsCount to be set to a value greater than or equal to 2."

on reading some article i can have it work on the portal but it is not working on vs code and even though adding the vnetPrivatePortsCount to the local.settings.json file, it still throws the same error, looking at the document it looks to be site config property but i am not sure where it will configured locally to have the action working. can you please advise or is this scenario is still not supported in vs code?

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
613 questions
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,087 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Mike Urnun 9,801 Reputation points Microsoft Employee
    2023-09-12T05:13:30.6233333+00:00

    Hello @Sumit Gaur Thanks for reaching out, and sorry for the late reply. The peek/lock triggers with a subsequent call to Complete action require your Standard Logic Apps to be in stateful mode. The following doc has the steps: Enable stateful mode for stateless built-in connectors in Azure Logic Apps


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.