list-connections

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
📋 Shared Instructions: shared-instructions.md - Cross-cutting concerns (Windows CLI compatibility, memory bank, etc.).
📋 通用说明:shared-instructions.md - 跨领域注意事项(Windows CLI兼容性、内存库等)。

List Connections

列出连接

Lists all Power Platform connections in the default environment using the Power Platform CLI (
pac
).
使用Power Platform CLI(
pac
)列出默认环境中的所有Power Platform连接。

Workflow

工作流程

  1. Fetch Connections → 2. Present Results

  1. 获取连接 → 2. 展示结果

Step 1: Fetch Connections

步骤1:获取连接

bash
pwsh -NoProfile -Command "pac connection list"
If
pac
is not authenticated, tell the user to run
pwsh -NoProfile -Command "pac auth create"
and try again.
Other failures:
  • Non-zero exit for any reason other than auth: Report the exact output. STOP.
  • No output or timeout: Run
    pwsh -NoProfile -Command "pac env list"
    to verify pac can reach the environment, then retry once.
bash
pwsh -NoProfile -Command "pac connection list"
如果
pac
未通过身份验证,请告知用户运行
pwsh -NoProfile -Command "pac auth create"
后重试。
其他故障处理:
  • 除身份验证外的任何原因导致非零退出:报告确切输出。停止操作。
  • 无输出或超时:运行
    pwsh -NoProfile -Command "pac env list"
    以验证pac是否能连接到环境,然后重试一次。

Step 2: Present Results

步骤2:展示结果

Show the connection list to the user. The Connection ID is what goes into
-c <connection-id>
when adding a data source.
If the needed connector is missing:
  1. Share the direct Connections URL using the active environment ID from context (from
    power.config.json
    or a prior step):
    https://make.powerapps.com/environments/<environment-id>/connections
    + New connection
  2. Search for and create the connector, then complete the sign-in/consent flow
  3. Re-run
    /list-connections
    to get the new connection ID
向用户展示连接列表。在添加数据源时,Connection ID需要填入
-c <connection-id>
参数中。
若所需连接器缺失:
  1. 使用上下文(来自
    power.config.json
    或之前步骤)中的活动环境ID分享连接的直接URL:
    https://make.powerapps.com/environments/<environment-id>/connections
    + 新建连接
  2. 搜索并创建连接器,然后完成登录/授权流程
  3. 重新运行
    /list-connections
    以获取新的连接ID