How to List Connections with pac connection list
pac connection list prints every connection in a Power Platform environment, with the ID that tools such as a deployment settings file ask for. One command, no clicking through the portal.
A connection is a signed-in link from an environment to a service, such as SharePoint or Office 365 Users. Apps and flows use them, usually through connection references. When you install a solution from the command line, you have to name the connection for each reference by its ID, and this command shows those IDs.
Syntax
pac connection list [--environment <environment>]
| Part | What it is |
|---|---|
pac connection list | The command. Microsoft's pac connection reference describes it as "List all Connections." |
--environment <environment> | Optional, short form -env. The environment to list, "a Guid or absolute https URL." Without it, the CLI uses "the active organization selected for the current auth profile." |
It needs a signed-in profile (How to Sign In to the Power Platform CLI with pac auth create). In my run it listed only my own connections, although three other people had opened an app in that environment and allowed its connections.
The example lists the connections in a trial environment called Overtime Timesheet Demo, the environment my profile has selected.
Step 1: Check Which Environment Your Profile Uses
pac connection list doesn't print the environment's name, so check it first:
pac env who
Connected as admin@example.com
Connected to... Overtime Timesheet Demo
If it's the wrong one, select another with pac env select, or add --environment to the command in the next step.
Step 2: List the Connections
pac connection list
Connected as admin@example.com
Id Name API Id Status
shared-sharepointonl-00000000-0000-0000-0000-000000000000 admin@example.com /providers/Microsoft.PowerApps/apis/shared_sharepointonline Connected
shared-excelonlinebu-00000000-0000-0000-0000-000000000000 admin@example.com /providers/Microsoft.PowerApps/apis/shared_excelonlinebusiness Connected
shared-office365grou-00000000-0000-0000-0000-000000000000 admin@example.com /providers/Microsoft.PowerApps/apis/shared_office365groups Connected
shared-office365user-00000000-0000-0000-0000-000000000000 admin@example.com /providers/Microsoft.PowerApps/apis/shared_office365users Connected
shared-office365-00000000-0000-0000-0000-000000000000 admin@example.com /providers/Microsoft.PowerApps/apis/shared_office365 Connected
shared-approvals-00000000-0000-0000-0000-000000000000 Standard approvals /providers/Microsoft.PowerApps/apis/shared_approvals Connected

Step 3: Read the Columns
| Column | What it holds | In the example |
|---|---|---|
| Id | The connection's ID: shared-, the start of the connector's name, and a unique ID | shared-office365user-… for Office 365 Users |
| Name | The connection's display name, usually the account it signed in with | admin@example.com; the Approvals one is called Standard approvals |
| API Id | The connector the connection is for | /providers/Microsoft.PowerApps/apis/shared_office365users |
| Status | Whether the connection works | All six Connected |
The API Id is the same value a deployment settings file calls ConnectorId, which is how you match a connection to a connection reference (How to Set Connection References in a Deployment Settings File).
Step 4: Find One Connector's Connection
With many connections, filter the output for the connector's name:
- bash/zsh
- PowerShell
pac connection list | grep office365users
shared-office365user-00000000-0000-0000-0000-000000000000 admin@example.com /providers/Microsoft.PowerApps/apis/shared_office365users Connected
pac connection list | Select-String office365users
shared-office365user-00000000-0000-0000-0000-000000000000
admin@example.com
/providers/Microsoft.PowerApps/apis/shared_office365users Connected
grep and Select-String keep only the lines that contain the text. PowerShell printed the same line, wrapped over three lines here. The first part, up to the first space, is the connection ID.
Common Mistakes
| Mistake | What happens | Do this instead |
|---|---|---|
| Running it against the wrong environment | You get IDs that mean nothing in the environment you're installing into | Check with pac env who, or add --environment |
| Copying the Name instead of the Id | A display name isn't an ID | Copy the whole value from the Id column |
| Using a connection that isn't Connected | Flows that use it won't run | Fix or recreate the connection first |
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| No connection for a connector | Nobody has created one in this environment | Create it in Power Apps under Connections, then list again |
| No active environment set for the current auth profile | The profile has no environment | pac env select, or --environment on the command |
| Connections you know exist are missing | They belong to someone else and aren't shared with you | Ask the owner to share them, or use your own |
FAQ
Is this the ID Power Apps shows?
Microsoft's deployment settings article suggests reading the connection ID from the address of the connection's page in Power Apps. The Id column gives it without opening each connection, and a settings file filled with these IDs imported without errors.
Does it show the password or token?
No. It shows the ID, display name, connector and status, nothing that signs in.
Conclusion
pac connection list shows each connection's Id, Name, connector (API Id) and Status. Check the environment with pac env who, list, and filter for the connector you need.
Additional Resources
- pac connection:
listand its--environmentoption.
