Mircrosoft Graph Sharepoint API for drive ids

Grant Fullston 25 Reputation points
2024-05-10T14:40:50.0466667+00:00

I am following the script here to get my graph api call in the graph explorer to find a file in a sharepoint folder (https://stackoverflow.com/questions/64558105/can-i-use-the-microsoft-graph-api-to-get-the-id-of-folder-within-a-sharepoint-do)

When I go to find my document libraryid i note that it contains a ! inside it, Eg "driveId": "b!wswHn...". I think this is breaking the API call when I try use it for https://graph.microsoft.com/v1.0/sites/siteid/drives/{document libraryid}/root/children

Is there a way around this? also giving: https://learn.microsoft.com/en-us/answers/questions/935944/graph-api-call-fails-when-name-contains-special-ch for background

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,840 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,849 questions
0 comments No comments
{count} votes

Accepted answer
  1. awijekoon 1,260 Reputation points Microsoft Vendor
    2024-05-12T17:47:46.2966667+00:00

    Hi Grant ,

    I tested the drive id that has the '!' character using graph explorer and postman. The api worked fine for me. Do you see any error when you run the api?

    User's image

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful