OneDrive and SharePoint File Picker v8 Issue - 500 Internal Server Error

Rakesh Joshi 256 Reputation points
2022-08-01T11:59:29.09+00:00

We are integrating SharePoint file picker v8 using the procedures outlined in the instructions here.

We're hosting the picker within an iframe. However, an issue has occurred, and the page within the iframe is not loading. The specifics are shown below.

Request -

request-id: edb256a0-c042-4000-c5d8-59f19fea2d8d  
   
  
curl 'https://figg.sharepoint.com/sites/Verifyit/Shared%20Documents/General/_layouts/15/FilePicker.aspx?filePicker=%7B%22sdk%22%3A%228.0%22%2C%22entry%22%3A%7B%22sharePoint%22%3A%7B%22byPath%22%3A%7B%22web%22%3A%22https%3A%2F%2Ffigg.sharepoint.com%2Fsites%2FVerifyit%2FShared%2520Documents%2FGeneral%22%7D%7D%7D%2C%22authentication%22%3A%7B%7D%2C%22messaging%22%3A%7B%22origin%22%3A%22https%3A%2F%2Fkrishna.boarddecisions.com%22%2C%22channelId%22%3A%224399e3c2-b827-4e4c-b245-92501ccae227%22%7D%2C%22typesAndSources%22%3A%7B%22mode%22%3A%22files%22%2C%22pivots%22%3A%7B%22sharedLibraries%22%3Atrue%2C%22recent%22%3Atrue%2C%22oneDrive%22%3Atrue%7D%7D%2C%22selection%22%3A%7B%22mode%22%3A%22single%22%7D%7D' \  
  -H 'authority: figg.sharepoint.com' \  
  -H 'cache-control: max-age=0' \  
  -H 'upgrade-insecure-requests: 1' \  
  -H 'origin: https://krishna.boarddecisions.com' \  
  -H 'content-type: application/x-www-form-urlencoded' \  
  -H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Teams/1.5.00.17656 Chrome/85.0.4183.121 Electron/10.4.7 Safari/537.36' \  
  -H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \  
  -H 'sec-fetch-site: cross-site' \  
  -H 'sec-fetch-mode: navigate' \  
  -H 'sec-fetch-dest: iframe' \  
  -H 'accept-language: en-US' \  
  --data-raw 'access_token=*******' \  
  --compressed  
  

Response -

500 INTERNAL SERVER ERROR  

Picker Configuration -

{  
    "sdk": "8.0",  
    "entry": {  
        "sharePoint": {  
            "byPath": {  
                "web": "https://figg.sharepoint.com/sites/Verifyit/Shared%20Documents/General"  
            }  
        }  
    },  
    "authentication": {},  
    "messaging": {  
        "origin": "https://krishna.boarddecisions.com",  
        "channelId": "4399e3c2-b827-4e4c-b245-92501ccae227"  
    },  
    "typesAndSources": {  
        "mode": "files",  
        "pivots": {  
            "sharedLibraries": true,  
            "recent": true,  
            "oneDrive": true  
        }  
    },  
    "selection": {  
        "mode": "single"  
    }  
}  

This worked great a few days ago with the same authentication and picker settings, but it no longer does.

Could you please help us figure out what is causing this and how to fix it?

Microsoft 365 and Office | SharePoint | Development
Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft 365 and Office | SharePoint Server | Development
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Accepted answer
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2022-08-24T09:07:45.693+00:00

    Hi @Rakesh Joshi
    I'm glad to hear you solve the problem ,if you have any issue about SharePoint, you are welcome to raise a ticket in this forum.

    By the way, since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others." and according to the scenario introduced here: Answering your own questions on Microsoft Q&A, I would make a brief summary of this thread:

    [OneDrive and SharePoint File Picker v8 Issue - 500 Internal Server Error]

    Issue Symptom:
    File Picker return 500 Internal Server Error

    Current status:
    The base path used to obtain the initial token was wrong. Works perfectly after fix it.

    You could click the "Accept Answer" button for this summary to close this thread, and this can make it easier for other community member's to see the useful information when reading this thread. Thanks for your understanding!

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2022-08-02T02:31:28.78+00:00

    Hi @Rakesh Joshi
    “500 Internal Server Error” is a general HTTP status code that refers there is an ambiguous error that occurred in the web server. but actually the server didn’t know what’s exactly the error to report it. Please check are you able to login / access files via your onedrive url? 500 error is usually an issue on the server side (which often clear up over a short period of time) but perhaps we can garner a bit more information from the logs. You can also try to clear the cache and cookies in browser to fix the issue.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.