Logic App Error Report Tool
  • 25 Feb 2022
  • 2 Minutes to read
  • Contributors
  • Comment
  • Dark
    Light
  • PDF

Logic App Error Report Tool

  • Comment
  • Dark
    Light
  • PDF

Article summary

The aim of the Logic App Error Report tool is to allow you to run a program that will inspect all of your Logic Apps and then give you a spreadsheet which will list how many errors there are for each Logic App, what errors there are and which action in each instance had an error.

Downloading the Tool

I have published the tool to Chocolatey to make it easy to get and run. If your not familiar with Chocolatey you can install it here:

https://chocolatey.org/docs/installation

To download the error report tool run the command:

choco install integrationplaybooklogicappserrorreport 

This will download and install the tool in the chocolatey directory.

Running the Error Report

The tool is in the chocolatey directory so you will need to change directory on the console to C:\ProgramData\chocolatey\bin.

If you run the help command below you will see the parameters needed:

C:\ProgramData\chocolatey\bin>IntegrationPlaybook.LogicApps.ErrorReport.exe -?

The parameters are:

Usage: IntegrationPlaybook.LogicApps.ErrorReport.exe [options] <tenantId> <subscriptionId> <clientId> <clientSecret> <excelOutputPath> <startDate> <endDate> <resourceGroups>
  • Tenant ID is the id for your Azure AD tenant
  • Subscription ID is the id for your Azure subscription
  • Client id is the client id for an Azure AD service principal with access to your logic apps
  • Client secret is the secret for your service principal
  • Excel Output Path is the path and filename for the excel file to produce
  • Start date is a datetime to start looking for errors
  • End date is the date time to end looking for errors
  • Resource Groups is a space seperated list of names of resource groups.

The below command is an example of running it:

C:\ProgramData\chocolatey\bin>IntegrationPlaybook.LogicApps.ErrorReport.exe 4b0527f3-34de-49e6-8c69-c99c48f4820f fd5343d9-2f9b-419f-a39b-2d7b141eb31c 4b845f4e-4e23-48e5-812c-c7112441fd2e MySecret LogicAppReport.xlsx 2020-09-10T00:00:00.000 2020-09-12T00:00:00.000 My-Resource-Group

The below values are obviously make up but as examples:

Tenant ID = 4b0527f3-34de-49e6-8c69-c99c48f4820f
Subscription ID = fd5343d9-2f9b-419f-a39b-2d7b141eb31c
Client ID = 4b845f4e-4e23-48e5-812c-c7112441fd2e
Client Secret = MySecret
Excel Output = LogicAppReport.xlsx
Start Date = 2020-09-10T00:00:00.000
End Date = 2020-09-12T00:00:00.000
Resource Groups = My-Resource-Group

When the tool runs it will confirm some info then query all of the logic apps available:

image.png

It will then go through and check for errors and which action had an error and spit out a spreadsheet at the end with 3 worksheets:

  • 1 = A summary of the errors per logic app
  • 2 = A list of the instances that got an error
  • 3 = A list of the actions that got an error

Running from Powershell

Below is an example of running the tool from Powershell to run it for the last 7 days.

$dateFormat = 'yyyy-MM-ddTHH:mm:ss.fff'

$tenantId = 'TBC'
$subscriptionId = 'TBC'
$clientId = 'TBC'
$clientSecret = 'TBC'
$excelPath = 'c:\Temp\LogicAppReport.xlsx'
$startDate = [DateTime]::Today.Date.AddDays(-7).ToString($dateFormat)
$endDate = [DateTime]::Today.Date.AddDays(1).ToString($dateFormat)
$resourceGroup = 'TBC'
$workingDirectory = 'C:\ProgramData\chocolatey\bin'


$arguments = "$tenantId $subscriptionId $clientId $clientSecret $excelPath $startDate $endDate $resourceGroup"
Write-Host $arguments
Start-Process -Wait -FilePath 'IntegrationPlaybook.LogicApps.ErrorReport.exe' -WorkingDirectory $workingDirectory -ArgumentList $arguments


How can this help you

A few ideas of how you could use the tool

Daily Error Report

You could automate this and produce a daily list of all of your Logic App errors

Troubleshooting

If something goes wrong impacting a lot of your logic apps you could run this to see what has been impacted and help you to fix issues

More Info

Code for tool:
https://github.com/michaelstephensonuk/IntegrationPlaybook-LogicAppErrorReport

Chocolatey Page:
https://chocolatey.org/packages/IntegrationPlaybook.LogicApps.ErrorReport

Explore more on Tracking Message Properties


Was this article helpful?