[Bug] `pa app add data-source` / `pa connection list-datasets` fails with AuthenticationError for shared_sharepointonline, even on a brand-new connection
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- typescript
- Domain
- api, authentication, cli
Research direction
Start by reproducing the failure with pa connection list-datasets and pa app add data-source for shared_sharepointonline, then trace the authentication and connector API request path and compare it with the successful Dataverse command. Done means a fresh interactive connection can list SharePoint datasets and add a tabular data source without the 403 or AuthenticationError.
Written by the indexing model from the issue text.
Description
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_sharepointonlineconnection viapa connection create --connector shared_sharepointonline(fresh interactive OAuth consent, browser sign-in completed successfully). The new connection fails identically with the sameAuthenticationError. - Not connection ownership:
pa connection listshows both connections owned by the currently authenticated user. - Not environment mismatch: both connections appear under
pa connection listin the active environment, matchingenvironmentIdinpower.config.json. - Not a service-principal auth issue:
pa auth statusshows an interactive user account, not an app registration. - Not table-name encoding: reproduces even at the
list-datasetsstep, 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 accountsucceeds cleanly in the same environment, same auth session, samepower.config.json. The failure is isolated toshared_sharepointonline.
Repro steps
pa auth login(interactive user)pa connection create --connector shared_sharepointonline(complete browser OAuth)pa connection list-datasets --connector shared_sharepointonline --connection-id <new-connection-id>- Observe
AuthenticationError/ 403 "Missing Authorization header for a privileged call on connection" (product policy)
- Dominant language
- TypeScript
- Stars
- 504
- Forks
- 145
- Avg merge
- 4h 3m
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/PowerAppsCodeApps
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
microsoft/PowerAppsCodeApps#465 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
microsoft/PowerAppsCodeApps#464 · 1 comment · 5 reactions ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
microsoft/PowerAppsCodeApps#463 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
microsoft/PowerAppsCodeApps#462 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
microsoft/PowerAppsCodeApps#461 ·
All issues in microsoft/PowerAppsCodeApps
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
dennys-bd/agent-hive#184 ·
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
ai-observability bug team/ai-observability
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vicharanashala/fln#563 ·