-
Notifications
You must be signed in to change notification settings - Fork 101
[Bug] SharePoint Service Functions Returning 404 (Resource Not Found) #274
Description
Describe the bug
I’m facing a 404 (Resource Not Found) issue when using SharePoint service functions like Get Tables / ODataStyleGetTables, even though I’m passing a valid SharePoint site address.
What’s interesting is that other SharePoint operations are working fine with the same site address especially the ones where {dataset} is not required. So this seems to be specific to functions that depend on {dataset}.
Steps to Reproduce
- Open PowerApps Code Apps
- Add SharePoint data source using:
pac code add-data-source -a "shared_sharepointonline" -c "connection-id-here" - Open
SharePointService.ts - Use the SharePoint service function:
ODataStyleGetTables - Pass a valid SharePoint site address as a parameter
- Run the app
- Open browser developer tools → Network tab
- Inspect the request → observe 404 error
Expected behavior
It should return the SharePoint lists (tables) from the given site without any errors.
Actual behavior
The API call fails with a 404 - Resource Not Found error.
While debugging this in detail, I noticed that the dataset (dataset name) is being sent as blank/null in the request.
On the other hand, when I connect to a specific SharePoint list using this command:
pac code add-data-source -a "shared_sharepointonline" -c "cdexxxxxxxxxxx" -d "https://xxxxxxxx.sharepoint.com/sites/xxxxxxx" -t "a228xxxxxxxxx"
everything works perfectly. In that case, the request URL clearly contains a valid dataset value.
Additional context
So it looks like for functions like ODataStyleGetTables, 'GetItemAttachments' and others which depends on dataset, the dataset parameter is either:
- not being set properly, or
- getting dropped somewhere internally
which is likely causing the 404.
Happy to share more logs or test further if needed.