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 365 and Office | SharePoint | For business | Windows
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Accepted answer
  1. AsithwMSFT 1,445 Reputation points Microsoft External Staff
    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

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.