Background: Finding Orphaned Azure API Connectors
Recently, I published my own version of a PowerShell script originally created by Mike Stephenson: Find Orphaned Azure API Connectors with PowerShell. That script scans all API Connections in a specific resource group and inspects every Logic App to determine whether those connections are still in use.
The main goal of that script is simple: quickly and effectively identify orphaned API Connections within a single resource group.
Improvements over the Original Script
I adapted the original script to better suit my needs and improve its usability. These changes focus mainly on output clarity and reporting:
- Produce a clearer and more readable output.
- Automatically add a Deprecated tag to all API Connectors, with a value of True or False.
- Extend the CSV report generation with additional customization options.
These enhancements make it easier to review results and decide which connectors require cleanup.
Limitation of the Initial Approach
The main limitation of the original script is its scope. It only checks one resource group at a time.
In environments with multiple resource groups, this approach forces you to reconfigure and run the script repeatedly. For example, if your subscription contains three or four resource groups, you must execute the script the same number of times.
Expanding the Script to All Resource Groups
To streamline this process and avoid unnecessary repetition, I decided to create a new version of the script.
This updated script scans all API Connections across every resource group in a single Azure subscription. It then inspects the Logic Apps within each resource group to verify whether their API Connections are still in use or not. This approach significantly reduces execution time and simplifies administration in larger environments.
📝 One-Minute Brief
Managing Azure Logic Apps at scale often leads to unused API Connections spread across multiple resource groups. This article extends a previous PowerShell approach by scanning all resource groups in a subscription to identify orphaned Azure API Connectors, helping administrators clean up resources and improve governance.
What’s new on this PowerShell script:
- It will check in all Resource Groups available on a single Subscription if API Connections are being used or not.
- Subscription Details output is improved, with coloring to better read:

- The list of available API Connectors grouped by Resource Group output is improved, with coloring to better read:

- List of Logic Apps and API Connectors association group by Resource Group and Logic App output is improved, with coloring to better read:

- The list of Orphaned API Connectors ordered by Resource Group output is improved, with coloring to better read:

Download
THIS POWERSHELL SCRIPT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND.
You can download Find Orphaned API Connectors in all Resource Groups from GitHub here:
Hope you find this helpful! If you liked the content or found it useful and would like to support me in writing more, consider buying (or helping to buy) a Star Wars Lego set for my son.