Ok. Straight to the point. The logic app that am supposed to monitor ( which I did not apparently, quite well ) failed a terrible 492 odd times. When I did notice the failures, it was quite late as you can Imagine.
Ah Ok !! The Logic App had one of its API Connections misconfigured. Gotcha.. Got that fixed. Now all the failed instances of the logic app needs to be re-run
Like everyone else I was looking for a Select All Checkbox + ReSubmit Button and found it nowhere. The only option left was to select 492 check boxes ( individually ) and then Resubmit in OMS. And am not a great fan of clicking my way out.
So ended up writing a C# Console Application that can Iteratively resubmit each instance of the failed logic app.
There are three things to be done to accomplish in order to bulk resubmit the failed logic apps
GetAccessToken
GetWorkflowHistoryRuns
ReSubmitFailedLogicApps
What do you need to Know to Run this Console Application ?
There are few settings that needs to be configured before running the App
AAD TenantId
Client AppId and Secret that has contributor permissions to the ResourceGroup Running the Logic App
Subscription Id, Resource Group Name, Logic App Name and the trigger name of the Logic App
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GetAccessToken fetches the bearer token to transact with Azure Management API’s
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GetWorkflowHistoryRuns fetches the list of failed logic app instances Iteratively
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ReSubmitFailedLogicApps submits the list of failed logic app instances to Azure to be Re-Run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.
Top comments (0)