Unexpected invalidRequest upon accessing SharedItem

Jöran Malek 96 Reputation points
2025-03-06T10:16:16.6766667+00:00

Seeing, for me unexplicable, invalidRequests (The provided drive id appears to be malformed, or does not represent a valid drive).

First, I query all shared Items by using /v1.0/me/drive/sharedWithMe?allowExternal=true. I then construct a query against one of the shared items by using remoteItem/parentReference/driveId and remoteItem/Id. This request is then sent out as /v1.0/drives/DriveId/items/RemoteItemId/children, but the only thing I'm receiving back is

{"error":{"code":"invalidRequest","message":"The provided drive id appears to be malformed, or does not represent a valid drive.","innerError":{"date":"2025-03-03T03:09:26","request-id":"854918ed-da68-4bde-b86c-45fa85c45003","client-request-id":"854918ed-da68-4bde-b86c-45fa85c45003"}}}

Response header x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"Southeast Asia","Slice":"E","Ring":"5","ScaleUnit":"001","RoleInstance":"SI2PEPF00007E43"}}.

Effectively the request is /v1.0/drives/4f7e40ff104bb5de/items/4F7E40FF104BB5DE!XYZ/children (Drive Id has been shuffled to not expose third-party personal information).

I can confirm, that when I'm accessing the item from a not-shared-with account I get AccessDenied, instead of Drive Id malformed (though, this is from {"ServerInfo":{"DataCenter":"Germany West Central","Slice":"E","Ring":"4","ScaleUnit":"000","RoleInstance":"FR1PEPF000019BC"}}) instead of Southeast Asia.

What's required from us to get this sorted with the Microsoft Graph team?

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Mohan Joshi-MSFT 740 Reputation points Microsoft External Staff
    2025-03-25T17:31:53.4566667+00:00

    Hi Jöran Malek,

    Thanks for reaching out to Microsoft!

    The error message "The provided drive id appears to be malformed or does not represent a valid drive." indicated that either driveID or itemId you are using is not correct. Ensure that driveId and itemId you are using are correct and properly formatted.

    If you still facing the same issue, I recommend you raise a support case with Microsoft Graph, a Support Engineer will be able to look into this issue and assist you better. You can raise support ticket from New support request - Microsoft Entra admin center or https://admin.microsoft.com/#/support/requests.

    Hope this helps.

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

    1 person found this answer helpful.

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.