Repository navigation
OneDrive File Picker SDK V8 fails to display user's Albums #91
Description
Describe the bug
The Albums page of the OneDrive File Picker is empty. When navigating to the Albums section through the Photos pivot, it shows an empty view with "This folder is empty" message even when albums exist in the user's OneDrive account.
To Reproduce
Steps to reproduce the behavior:
Open the application that integrates with OneDrive File Picker v8
Click on the OneDrive button to launch the file picker
Authenticate with a Microsoft account that has access to OneDrive
Navigate to the Photos section in the left navigation
Click on Albums tab/section
Observe that the Albums page is completely blank with a "This folder is empty" message
Expected behavior
The Albums page should display all albums available in the user's OneDrive account, allowing users to browse and select photos from their albums just like they can with the other sections (Recent, My Files, etc.).
Screenshots
Details
We are implementing the OneDrive File Picker v8 in an Electron application using the recommended approach from the Microsoft documentation. We use the proper authentication flow and can successfully access other sections of the picker (like Recent files, My Files).
The issue specifically occurs only in the Albums section, which seems to be affected by CORS errors and API authentication issues that prevent proper data loading. Browser console shows multiple errors like:
Access to fetch at 'https://substrate.office.com/recommended/api/beta/edgeworth/recent?order=recent&top=20&apps=Word%2CExcel%2CPowerPoint%2COneNote%2CVisio%2CPdf&rs=en%2DUS' from origin 'https://onedrive.live.com' has been blocked by CORS policy
We've attempted to use various configurations including:
Explicitly enabling photos and albums in the picker configuration
Setting appropriate scopes (OneDrive.ReadWrite and Files.ReadWrite)
Bypassing the complex SDK with a direct URL approach
The application is developed with Electron (with proper CORS handling) and TypeScript.
Additional context
The issue only affects the Albums section; other sections of the File Picker work correctly
We've verified that albums exist in the OneDrive account being tested
The same behavior occurs across multiple user accounts, suggesting it's not account-specific
We've observed that the picker makes API calls to substrate.office.com which fail with CORS errors
When using the direct URL approach with legacy picker, the issue might be circumvented but this doesn't provide the full expected functionality of the v8 picker
Our implementation follows the official Microsoft documentation for the OneDrive File Picker v8, but the Albums functionality appears to have specific issues with API access in the Electron environment.
Activity
JuhaszBalint2 commentedon Apr 14, 2025
Patrick Rodgers (@patrick-rodgers) Can you help please?
JCrew0 commentedon Apr 24, 2025
JuhaszBalint2 Can you collect a .har trace and send it to justincarway@microsoft.com by any chance? Could help narrow down where this error is being caused
JuhaszBalint2 commentedon Apr 24, 2025
Hi. Sure I will soon.
JuhaszBalint2 commentedon Apr 24, 2025
Hi. Before I send you the HAR trace, I must ask: I clicked on the "Export HAR trace (sanitized)... button" in the network tab. Does this sanitized HAR trace contain any sensitive info like credentials I should remove? The file is a huge JSON file.
JCrew0 commentedon Apr 24, 2025
JuhaszBalint2 Nope, sanitized har files don't contain sensitive info. If it makes you more comfortable, you can always go through Microsoft support as well, but sometimes it can take a while to get to us through that route.
JCrew0 commentedon Apr 24, 2025
JuhaszBalint2 Can you also check if your Recent view is messed up at all as well?
JuhaszBalint2 commentedon Apr 24, 2025
Fine then, thank you. I'm sending you the HAR trace file. You should receive it in a couple of minutes.
JuhaszBalint2 commentedon Apr 24, 2025
Nope, not messed up at all. Looks perfectly tidy. However, Albums aren't displayed at all even tho I have plenty of Albums on OneDrive.