Forum Discussion

slhangen's avatar
slhangen
Helper II
5 years ago
Solved

Getting Access is forbidden error when connecting OneDrive excel file

How do I get to the Authenticate screen to input credentials? Saw the screen once and cannot get back to it.

  • With the SharePoint Folder connector you only use the site URL and then navigate to the file with the FileName and FolderPath columns.  Delete the url text after the site level.

    Regards,

    Pat

10 Replies

  • mahoneypat's avatar
    mahoneypat
    Microsoft Employee

    Go to File/Options and Settings/Data Source Settings (or choose Data Source Settings in the query editor).

    Regards,

    Pat

    • slhangen's avatar
      slhangen
      Helper II

      My data is not in there.  I cannot load data, keep getting access forbidden error.  Need to authenticate data before it loads into model, right?

    • slhangen's avatar
      slhangen
      Helper II

       

       

      When I paste link into web form I get this error.

       

      Need to get to this:

      But I can't figure out how to access this box

       

  • mahoneypat's avatar
    mahoneypat
    Microsoft Employee

    Yes.  That happens sometimes with some sources.  To get there in this case, go to the query editor and start a new blank query.  In the Formula Bar (check the box in View tab if you don't see it) and write the first line of your query like = Web.Contents("<your url>") 

    You should then get the error but also a button you can click to Edit Crendentials for that source.

    Regards,

    Pat

    • slhangen's avatar
      slhangen
      Helper II

      Can I get a little more details?

      Pasted code but did not get the box to enter credentials. Got the following:

       

       

    • slhangen's avatar
      slhangen
      Helper II

      Can you elaborate please? Pasted info into query editor but still not able to get authenitcation box.  Got it the very first time I tried but nothing in subsequent attempts.

       

      Thx for your time.

  • mahoneypat's avatar
    mahoneypat
    Microsoft Employee

    Are you using the url from when you open the file in the desktop app?  The one that ends in ?web=1 (that you delete).

    In any case, it looks like you are connecting to a OneDrive file, and I would use the SharePoint folder connector instead, replacing @ and . in your email address to _ 

     

    Regards,

    Pat

    • slhangen's avatar
      slhangen
      Helper II

      Thx so much for your help, Pat.  USed SharePoint Folder connector.

      Pasted in url, deleting the ?web=1 and got the authentication box.  Filled out box with credentials and got this error:

       

       

       

      ugh!

  • mahoneypat's avatar
    mahoneypat
    Microsoft Employee

    With the SharePoint Folder connector you only use the site URL and then navigate to the file with the FileName and FolderPath columns.  Delete the url text after the site level.

    Regards,

    Pat

    • slhangen's avatar
      slhangen
      Helper II

      Got it, thank you so much for your time and hlep Mr. Pat!