Service_InternalServerError

Moh Luay 0 Reputation points
2023-10-16T09:35:25.9333333+00:00

I'm using below endpoint to fetch users

https://graph.microsoft.com/beta/users

However it returns 200 with response users for the first page and the second page,

but for the third page, it return a 500 error response

below the url:

https://graph.microsoft.com/beta/users?$skiptoken=[FILTERED]

and the reesponse:

{
    "error": {
        "code": "Service_InternalServerError",
        "message": "Encountered an internal server error.",
        "innerError": {
            "date": "2023-10-16T08:46:41",
            "request-id": "4b709da2-1035-4c5a-8eea-6dd1d196f973",
            "client-request-id": "4b709da2-1035-4c5a-8eea-6dd1d196f973"
        }
    }
}
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,837 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. CarlZhao-MSFT 37,786 Reputation points
    2023-10-17T08:52:02.8433333+00:00

    Hi @Moh Luay

    Try using the $top query parameter to paginate the results returned by the server.

    https://graph.microsoft.com/beta/users?$top=50
    

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.


  2. Moh Luay 0 Reputation points
    2023-10-19T13:43:08.02+00:00

    Hi Carl,

    Thanks for answering.

    I'm still facing the problem with adding limit parameters on certain page,

    I used below endpoint, for requesting fifth page;

    https://graph.microsoft.com/beta/users?$top=50&$skiptoken=RFNwdAIAABE6ZXN1bkBob2ZmbWFuLmNvbSlVc2VyX2IyMjM4ODgyLWVjYjYtNDY0My1iNTc4LWJjMTQwOWY4ODI1ZgAWOmhhLWhrX2VoYUBob2ZmbWFuLmNvbSlVc2VyXzczMDU4MWI4LTRhYzgtNDMxMC04ZDA2LWM4ZTE5NDIxZGIzZLkAAAAAAAAAAAAA

    still same response:

    {
        "error": {
            "code": "Service_InternalServerError",
            "message": "Encountered an internal server error.",
            "innerError": {
                "date": "2023-10-19T13:39:39",
                "request-id": "65dcfec5-8fd8-440a-ae42-d78d20764137",
                "client-request-id": "65dcfec5-8fd8-440a-ae42-d78d20764137"
            }
        }
    }
    
    0 comments No comments