Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OneDrive File Picker gives 404 #73

Open
Orangeapplebot opened this issue Apr 1, 2024 · 2 comments
Open

OneDrive File Picker gives 404 #73

Orangeapplebot opened this issue Apr 1, 2024 · 2 comments

Comments

@Orangeapplebot
Copy link

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

@skulltech
Copy link

skulltech commented Aug 11, 2024

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

@Tjerkdb
Copy link

Tjerkdb commented Aug 12, 2024

Same problem on my side

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

No branches or pull requests

3 participants