Skip to content

OneDrive File Picker gives 404 #73

Open

Description

Describe the bug
Onedrive FilePicker gives 404. When using the exact implementation in the examples, the auth works correctly, but picker opens with a 404. I have made an application from Microsoft EntraID. I have set-up web redirect uris. My client and backend do the oAuth and finally, the access token is passed to my client. Using this access token, I'm trying to open the onedrive file picker, but it gives a 404. Even using the onedrive js samples, I'm getting the same error.

To Reproduce
I replaced my client id in onedrive samples. I was asked to add a client secret to it.
I only want onedrive and not sharepoint, so I changed my scopes with "Files.Read.All Sites.Read.All".
After which, I realised I was getting the access token directly, and didn't need to exchange it for idToken.

    const resp = await app.loginPopup(authParams);
    app.setActiveAccount(resp.account);
    const accessToken = resp.accessToken;

So, this code works the oauth for me. I'm also getting a refresh token along with it, which is weird, because Im not asking for "offline_access" in scopes or am I acking for consent.
The entry_point I'm using is: "https://onedrive.live.com/picker"
The rest of the code is the same as the onedrive js sample. I'm getting a 404 after this point, my onedrive popup opens, and I'm getting, the data couldn't be loaded. It asks me to redirect to onedrive, where I'm already signed in, which means, the access token is passed correctly. Is the url I'm using incorrect somehow?

Expected behavior
I should be seeing the onedrive file picker popup where the user can choose which files/folders they want to select.

Screenshots
image

Activity

  1. skulltech commented on Aug 11, 2024

    @skulltech

    i'm facing the exact same issue. Any clarity on this will help a lot. Devvanshhh (@Orangeapplebot) did you find a solution for this?

  2. Tjerkdb commented on Aug 12, 2024

    @Tjerkdb

    Same problem on my side

  3. JCrew0 commented on Apr 23, 2025

    @JCrew0

    Devvanshhh (@Orangeapplebot) Sumit Ghosh (@skulltech) Tjerkdb Are you still encountering this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions