/sites/delta requests return 500 Internal server error.

kari.tuominen 10 Reputation points
2025-01-27T05:08:14.9366667+00:00

Requests to https://graph.microsoft.com/v1.0/sites/delta endpoint return error:


{
    "error": {
        "code": "generalException",
        "message": "The request URI is not valid. The segment 'oneDrive.delta' must be the last segment in the URI because it is one of the following: $ref, $batch, $count, $value, $metadata, a named media resource, an action, a noncomposable function, an action import, a noncomposable function import, an operation with void return type, or an operation import with void return type."
    }
}


I get same error with 2 different tenant.

Is there some global issue or do I do something wrong here?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,954 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Anne Admin 6 Reputation points
    2025-01-28T23:03:58.2733333+00:00

    I found the exact same issue, it started happening over the weekend - I think Microsoft needs to escalate this! https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/2810

    1 person found this answer helpful.
    0 comments No comments

  2. Yakun Huang-MSFT 9,780 Reputation points Microsoft Vendor
    2025-01-27T06:45:04.61+00:00

    Hello kari.tuominen,

    Thank you for reaching out to Microsoft Support!

    For this endpoint, we tested delegated permissions and application permissions respectively.

    An error is also reported for delegated permissions, and the issue appears to be API-side, so it is currently unavailable until the API fixes it.

    For application permissions, everything works fine, and the test results are as follows:

    Screenshot 2025-01-27 064215

    What permissions are you using? If you are using delegated permissions, it is recommended that you change to application permissions first.

    Reference document:

    https://learn.microsoft.com/en-us/graph/api/site-delta?view=graph-rest-1.0&tabs=http#code-try-1

    Hope this helps.

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


  3. Vishnu Prasad 0 Reputation points
    2025-02-03T11:24:28.38+00:00

    It was working all fine until a few days ago. Sites.Read.All is set to Application permission.

    {'error': {'code': 'generalException', 'message': "The request URI is not valid. The segment 'oneDrive.delta' must be the last segment in the URI because it is one of the following: $ref, $batch, $count, $value, $metadata, a named media resource, an action, a noncomposable function, an action import, a noncomposable function import, an operation with void return type, or an operation import with void return type.", 'innerError': {'date': '2025-02-03T11:12:57', 'request-id': '94b81268-89a4-465f-b373-100c37d08203', 'client-request-id': '94b81268-89a4-465f-b373-100c37d08203'}}}
    
    
        url = 'https://graph.microsoft.com/v1.0/sites/delta'
        headers = {
            'Authorization': f'Bearer {access_token}',
            'Content-Type': 'application/json'
        }
        
        response = requests.get(url, headers=headers)
        response_data = response.json()
        print(response_data)
    
    0 comments No comments

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.