Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Bug] `pa app add data-source` / `pa connection list-datasets` fails with AuthenticationError for shared_sharepointonline, even on a brand-new connection

オープン
#459 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
活発
技術スタック
typescript

調査の方向性

まず shared_sharepointonline に対して pa connection list-datasets と pa app add data-source を実行して失敗を再現し、次に認証とコネクタ API リクエストの経路を追跡して、成功する Dataverse コマンドと比較します。新しい対話型接続で SharePoint のデータセットを一覧表示し、403 や AuthenticationError を発生させずに表形式のデータソースを追加できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug

Environment

  • pa --version: 1.0.1
  • Cloud: commercial (not GCC/GCC High/DoD) — confirmed via make.powerapps.com
  • OS/shell: Windows 11, PowerShell
  • Auth: interactive user (pa auth login), not a service principal

Symptom

Adding a SharePoint Online tabular data source fails with a 403 directly from the connector API Management layer:

HTTP error status: 403 for GET https://<env>.01.common.usa002.azure-apihub.net/apim/sharepointonline/<connection-id>/$metadata.json/datasets/<encoded-site-url>/tables/<encoded-table-name>

Response body:

{
  "Message": "Missing Authorization header for a privileged call on connection.",
  "Source": "product policy"
}

The same failure reproduces one level down, using pa connection list-datasets directly (no table/dataset involved at all):

pa connection list-datasets --connector shared_sharepointonline --connection-id <connection-id>

Failed to get datasets for connection '<connection-id>' and connector 'shared_sharepointonline': {"exitCode":3,"remediation":"Run `pa auth login` to sign in, or verify you have access to this environment.","name":"AuthenticationError"}

What I've ruled out

  • Not a stale/broken connection: created a brand-new shared_sharepointonline connection via pa connection create --connector shared_sharepointonline (fresh interactive OAuth consent, browser sign-in completed successfully). The new connection fails identically with the same AuthenticationError.
  • Not connection ownership: pa connection list shows both connections owned by the currently authenticated user.
  • Not environment mismatch: both connections appear under pa connection list in the active environment, matching environmentId in power.config.json.
  • Not a service-principal auth issue: pa auth status shows an interactive user account, not an app registration.
  • Not table-name encoding: reproduces even at the list-datasets step, before any table/dataset value is involved.
  • Not GCC-specific (ruling out the class of bug in #348 / AADSTS65002): confirmed via make.powerapps.com this is a standard commercial tenant, and the error text/code here is a different one ("Missing Authorization header for a privileged call on connection" / product policy, not AADSTS65002).
  • Not a broader auth/environment breakdown: pa app add data-source --connector dataverse --table account succeeds cleanly in the same environment, same auth session, same power.config.json. The failure is isolated to shared_sharepointonline.

Repro steps

  1. pa auth login (interactive user)
  2. pa connection create --connector shared_sharepointonline (complete browser OAuth)
  3. pa connection list-datasets --connector shared_sharepointonline --connection-id <new-connection-id>
  4. Observe AuthenticationError / 403 "Missing Authorization header for a privileged call on connection" (product policy)
主要言語
TypeScript
スター
504
フォーク
145
平均マージ
4時間 3分
マージ済み PR(30日)
1

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/PowerAppsCodeApps のほかの issue

microsoft/PowerAppsCodeApps の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。