This repository contains a PowerShell script you can run to list all On-premises Data Gateways used by Logic App API connections and save to a CSV file. For more information on finding correlations between Logic App API connections and On-premises Data Gateways, please visit my blog here.
Find out which On-premises Data Gateways are used by which API connection resources.
- An active Azure subscription.
- An Azure account, which has the permission to read all resources within the above subscription.
- Before running the script, please install the Azure Az module for your PowerShell. Introducing the Azure Az PowerShell module Microsoft Docs.
After downloading the script into your machine, put in the name of your Azure subscription for the subscriptionName variable.
Then run the script and log into your Azure account in the pop-up window.
A CSV file named “output.csv” will be created in the same folder where the script resides.
The CSV file will contain all API connection resources along with the OPDGs they are using.
Columns:
- connectionName: name of the API connection resource
- connectionId: resource ID of the API connection
- gatewayName: name of the On-premises Data Gateway resource
- gatewatyId: resource ID of the On-premises Data Gateway
-
If you encountered the "script not signed" error, please run the below PowerShell command to bypass the security policy in the current session.
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
-
Alternative to run the script locally, you may choose to run this through cloud shell. However please remember to remove the first command "Connect-AzAccount" as it will no longer be required.