Skip to content

file-picking/javascript-basic-consumer broken #66

Open

Description

Describe the bug
File picking for personal accounts seem broken. Following instructions result in the picker showing a bicycle with a flat tire instead of my OneDrive files. This is neither what I want nor what I expect.

To Reproduce
Steps to reproduce the behavior:

  1. Follow the guidance in the root readme for setting up the AAD application
  2. Follow the guidance in the javascript-basic-consumer readme for setting up the FilePicker application

Expected behavior
I expect the "Launch Picker" button to bring the OneDrive experience directly into the application to provide a consistent, familiar, user-friendly experience to ensure my users can find the files they need and stay productive—no matter what they’re working on.

Screenshots
image

image

Details
The dev console spits out some clues that may or may not be related to this issue.

Error: Resource #285 "provider.instrumentation" is being consumed, but is not available in the current scope.

  1. Check to ensure that the dependency on this resource (and each step up the chain) is properly declared.
  2. If availability is expected, check to see if the target resource has a dependency that is only available in a child scope. Consumed directly.

Activity

  1. osolmaz commented on Feb 9, 2024

    @osolmaz

    Also affected by this.

    Can also reproduce with a confidential client.

    Adding the cid query parameter mentioned in below pages doesn't seem to fix the issue.

    https://stackoverflow.com/questions/77457558/problem-connecting-to-onedrive-file-picker-v8
    #61 (comment)

    I am out of ideas here. Maybe there is something wrong in the query parameters?

    const params = {
        sdk: "8.0",
        entry: {
            oneDrive: {
                files: {},
            }
        },
        authentication: {},
        messaging: {
            origin: "http://localhost:3000",
            channelId: "27"
        },
        typesAndSources: {
            mode: "files",
            pivots: {
                oneDrive: true,
                recent: true,
            },
        },
    };
    
  2. jgullstr commented on Feb 14, 2024

    @jgullstr
    Author

    We had a working integration up and running that suddenly broke down with this error, so I assume something has changed in the FilePicker itself. I found the same issue on learn.microsoft.com here.

  3. saadumerhashmi commented on Feb 15, 2024

    @saadumerhashmi

    I am facing the same issue. I had working integration up and running that suddenly broke down with this error. Adding CID doesn't seems to work.
    cap

  4. codenamegary commented on Mar 1, 2024

    @codenamegary

    Seems the same as this issue.

    #61

    Not clear to me if this is really even supported at this point.

  5. jgullstr commented on Mar 6, 2024

    @jgullstr
    Author

    I have had an open ticket with Microsoft support since feb 14. After a few back and forths, the case got escalated "to discuss the issue with our concerned team". I did not hear back from them within a week, and asking for an approximate time window I got informed that there is a delay due to backlog of cases. Today, finally, I got a response, translated below, and the case was promptly closed. I hope this will help someone.

    Microsoft's own summary of the issue:

    Integration for OneDrive FilePicker v8 on personal accounts has broken down. I don't know who to contact. I need to know if something has changed, because an existing, working integration of ours have suddenly stopped working. The issue can be reproduced by following your own instructions in the sample repository: #66

    Microsoft support response:

    Hi Josef,

    The OneDrive file picker allows you to connect your custom web apps to content stored in OneDrive (both commercial and enterprise) and SharePoint. The file picker provides a consistent and familiar user interface for your web app users to open, save, and share files stored in OneDrive or SharePoint. This file picker is exclusive to business applications.

    Ref:

    1. File Picker SDK for JavaScript - OneDrive - OneDrive dev center | Microsoft Learn
    2. OneDrive File Picker v8 now generally available! - Microsoft 365 Developer Blog (Feel free to look at a short gif in this article to understand how the file picker works.

    If you need help with the file picker, contact commercial support. They can help you with your problem.

    See: https://learn.microsoft.com/microsoft-365/admin/support-contact-info?view=o365-worldwide

    Your feedback is important to us. After this interaction, you will receive a separate closing email with the opportunity to tell us about your experience.
    ​>

    Thanks
    Nav M.
    OneDrive support.
    Shift time: 10:00 a.m. – 7:00 p.m. (PST)

    Note that the link 1 is to FilePicker v7, and that the short gif that I am to watch "in order to understand how the file picker works", is showing the sample that currently is broken.

  6. damacisaac commented on Mar 6, 2024

    @damacisaac

    Getting the same issue while following the instructions in the samples and documentation. Trying for the most basic implementation here and failing.

    We have a working implementation of the v7.2 picker, but we can't use it because our picker needs to be embedded in an iframe rather than opening a new tab. In Excel Desktop, opening a new browser tab doesn't work as the webview that addins run in isn't able to communicate with another browser.

  7. codenamegary commented on Mar 7, 2024

    @codenamegary

    Josef Gullström (@jgullstr) - Thanks for sharing that conversation. Quite disheartening, but glad to know I'm not suffering alone. I wonder how many hours people are wasting trying to make this work based on the broken examples and misinformation? Kind of a shame.

  8. damacisaac commented on Mar 8, 2024

    @damacisaac

    Patrick Rodgers (@patrick-rodgers) it would be very appreciated if you and the team could have someone take a look at this ticket.

  9. uyanga-gb commented on Mar 12, 2024

    @uyanga-gb

    We have the same problem in OneDrive for consumer account type. It was working before but suddenly stopped working sometime in early February 2024. I tried adding cid, but that didn't help. Can someone take a look at this issue Patrick Rodgers (@patrick-rodgers)?

  10. adri1wald commented on Mar 19, 2024

    @adri1wald

    It's because the initial URL has a bad query param:

    https://api.onedrive.com/v1.0/drives/REDACTED/items/root/children?%24top=30&orderby=folder%2CsavedSortFieldValue&%24expand=thumbnails%2Clenses%2Ctags&select=*%2Cocr%2CwebDavUrl%2CsharepointIds%2CisRestricted%2CcommentSettings%2CspecialFolder%2CcontainingDrivePolicyScenarioViewpoint
    

    savedSortFieldValue is not valid. if you replace it with name, fileSystemInfo%2FlastModifiedDateTime, or size the request works (or just change the sort order in the UI). can someone at microsoft please fix this?

  11. SenorFusion commented on Mar 20, 2024

    @SenorFusion

    Maybe Justin Carway (@JCrew0) can help, he seemed to know what happened on #61 which is the same issue.

    The fix is known, thanks to Adrien Wald (@adri1wald) comment above mine.

    Be sure to see Josef Gullström (@jgullstr) comment above where we have tried to escalate this through support and they say it is fine and close the issue.

    This is a complete breaking change for anyone that uses File Picker v8 in a webapp

  12. JCrew0 commented on Mar 20, 2024

    @JCrew0

    Thanks Adrien Wald (@adri1wald) for figuring this out. SenorFusion I can take a look at why that query param is breaking things

  13. adri1wald commented on Mar 26, 2024

    @adri1wald

    looks like this is fixed now -- thanks Justin Carway (@JCrew0) and team!

  14. damacisaac commented on Mar 26, 2024

    @damacisaac

    Really appreciate it Justin Carway (@JCrew0) and team. Well done!

  15. alvinalaphat commented on Apr 3, 2024

    @alvinalaphat

    const params = {
    sdk: "8.0",
    entry: {
    oneDrive: {
    files: {},
    }
    },
    authentication: {},
    messaging: {
    origin: "http://localhost:3000",
    channelId: "27"
    },
    typesAndSources: {
    mode: "files",
    pivots: {
    oneDrive: true,
    recent: true,
    },
    },
    };

    Ok I have solved it people. All you have to do is remove this part from the params:

      typesAndSources: {
          mode: "files",
          pivots: {
              oneDrive: true,
              recent: true,
          },
      },
    
  16. damacisaac commented on Apr 8, 2024

    @damacisaac

    I take it back - I'm still getting the same error. Error: Resource #287 "provider.instrumentation" is being consumed, but is not available in the current scope.. Seems like this prevents the picker from being able to authenticate properly.

  17. pieterclaerhout commented on Jun 13, 2024

    @pieterclaerhout

    Any update on this? As far as I can see, this problem still exists…

  18. Acrylios commented on Oct 11, 2024

    @Acrylios

    Are there any further updates? I tried opening a separate issue as I'm having a similar problem to this thread but haven't gotten any replies yet

  19. damacisaac commented on Oct 11, 2024

    @damacisaac

    Justin Carway (@JCrew0) would be great to have this looked at again - thanks!

  20. emelabnext commented on Oct 25, 2024

    @emelabnext

    +1, like Angus MacIsaac (@damacisaac) and Acrylios said, would be very much appreciated if this get's resolved.

  21. JaronKing commented on Aug 7, 2025

    @JaronKing

    What was the solution for this? I am having the same issue.

    The samples use OneDrive.ReadWrite permission and I feel like it might be related to permissions.

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