Describe the bug
Am developing a feature for a web app that allows users to select and upload files using FilePicker v8.0 SDK and azure/msal-browser for auth.
I'm able to successfully auth, launch file picker and browse and upload files belonging to a specific SharePoint site. When browsing files within the site, I see successful calls to https://{my tenant name}.sharepoint.com. However, when clicking on the Shared option in the file picker sidebar, a call to https://{tenant name}-my.sharepoint.com is triggered and returns a 401.
Similarly, when I enable displaying of recent files through the file picker config and click on Recent, I get a 401 for a GET request to https://{tenant name}-my.sharepoint.com/_api/v2.0/drives/me/recent.
My understanding is that a single file picker instance cannot be used to access both Sharepoint and OneDrive items--are the oneDrive and recent options nested in typesAndResources -> pivots applicable only when entry point is OneDrive? In this example config I see oneDrive and recent options set to true even though entry point is SharePoint.
Is it a configuration issue on my end (details posted below) that could be resulting in being able to successfully browse and upload files, but getting 401 when clicking on any of the Pick an item sidebar options (e.g., My files, Recent, Shared)? Is there a way to allow calls to OneDrive resources for this file picker using a SharePoint site as its base url?
Is there an option to hide the Pick an item sidebar? I've tried setting oneDrive, recent, sharedLibraries all to false in file picker typeAndResource -> pivots config.
Thank you in advance!
Details
Clicking on Shared (and Recent when enabled), triggers call to {tenant name}-my.sharepoint endpoint which returns 401:
Describe the bug Am developing a feature for a web app that allows users to select and upload files using FilePicker v8.0 SDK and
azure/msal-browser
for auth.I'm able to successfully auth, launch file picker and browse and upload files belonging to a specific SharePoint site. When browsing files within the site, I see successful calls to
https://{my tenant name}.sharepoint.com
. However, when clicking on theShared
option in the file picker sidebar, a call tohttps://{tenant name}-my.sharepoint.com
is triggered and returns a 401.Similarly, when I enable displaying of recent files through the file picker config and click on
Recent
, I get a 401 for a GET request tohttps://{tenant name}-my.sharepoint.com/_api/v2.0/drives/me/recent
.My understanding is that a single file picker instance cannot be used to access both Sharepoint and OneDrive items--are the
oneDrive
andrecent
options nested intypesAndResources
->pivots
applicable only when entry point is OneDrive? In this example config I seeoneDrive
andrecent
options set to true even though entry point is SharePoint.Is it a configuration issue on my end (details posted below) that could be resulting in being able to successfully browse and upload files, but getting 401 when clicking on any of the
Pick an item
sidebar options (e.g.,My files
,Recent
,Shared
)? Is there a way to allow calls to OneDrive resources for this file picker using a SharePoint site as its base url?Is there an option to hide the
Pick an item
sidebar? I've tried settingoneDrive
,recent
,sharedLibraries
all to false in file pickertypeAndResource
->pivots
config.Thank you in advance!
Details Clicking on
Shared
(andRecent
when enabled), triggers call to{tenant name}-my.sharepoint
endpoint which returns 401:File picker config:
Auth code: