microsoftgraph / microsoft-graph-explorer-v4

React/Redux version of Graph Explorer used to learn the Microsoft Graph Api
https://developer.microsoft.com/graph/graph-explorer
MIT License
202 stars 84 forks source link

Graph Explorer - NextLink URL failing with 400 Bad Request- Request Too Long #3184

Closed vrsinghal closed 1 month ago

vrsinghal commented 1 month ago

Describe the bug There is an issue with pagination. When we try to follow @odata.nextlink on Graph Explorer we run into:

{
    "error": {
        "code": "UnknownError",
        "message": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"\"http://www.w3.org/TR/html4/strict.dtd\"><HTML><HEAD><TITLE>Bad Request</TITLE><META HTTP-EQUIV=\"Content-Type\" Content=\"text/html; charset=us-ascii\"></HEAD><BODY><h2>Bad Request - Request Too Long</h2><hr><p>HTTP Error 400. The size of the request headers is too long.</p></BODY></HTML>",
        "innerError": {
            "date": "2024-05-23T13:40:45",
            "request-id": "ac048583-3997-4463-b404-983fd8e8cd59",
            "client-request-id": "f7469d77-c2e6-8e41-2c96-ba24356f81a7"
        }
    }
}

Expected behavior The request should reach the workload and return correct response.

Screenshots image

Additional context This issue is reproducing every time on graph explorer. I am able to see successful response for the same request via postman. HAR logs: https://michev-my.sharepoint.com/:u:/g/personal/vasil_michev_info/EXwD9-LNG7tJs16beWqPzpEBN1cKm0vZoR8IyRZS1gL8Vw?e=Ss1yFh

thewahome commented 1 month ago

@vrsinghal I have had a chance to look at the har file you sent and a few other URLs that produce nextLink options. The result of https://graph.microsoft.com/beta/$metadata#admin/teams/userConfigurations does indeed produce a nextLink property that is 7194 characters long.

While URLs can be any length, major browsers are not able to support more than 2000 characters hence why this error is produced.

If you report this issue in the Microsoft Q&A forum, it will get routed to the appropriate team for them to triage and probably see how to reduce the size of the URL generated so that it can be supported on multiple browsers.

microsoft-github-policy-service[bot] commented 1 month ago

Hello @vrsinghal

Thank you for reporting your concern. Unfortunately, we in the Graph Explorer team do not have any ownership of the APIs that are causing you issues. If you report this issue in the Microsoft Q&A forum, it will get routed to the appropriate team for them to triage. https://aka.ms/askgraph This issue will now be closed. If you encounter any issues with Graph Explorer in the future, please feel free to open an issue.