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
/sites/delta requests return 500 Internal server error.
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?
3 answers
Sort by: Most helpful
-
-
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:
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.
-
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)