Forum Discussion
KarenSaund888
Jan 19, 2022Copper Contributor
How can i get a Sharepoint Folder / document library Id by path?
I am getting sharepoint folders by using the graph api as follows
The structure is as follows:
TestTeam
TestChannel1
TestChannelFolder1
TestFile1.xlxs
TestChannel2
TestChannelFolder2
TestFile2.xlxs
So the Team is TestTeam and the channels are TestChannel1, TestChannel2 and in each channel there are folders and in the folders there are files.
First I get the Teams:
https://graph.microsoft.com/v1.0/me/joinedteams
This give me back Json data with id, displayname etc.
I the call https://graph.microsoft.com/v1.0/groups/{folder-id}/drive/items/root/children/ This gives back Json with files and folders.
Is there a graph api call that can directly give me back the id by using the path , instead of the Id ?
So if I select TestTeam->TestChannel->TestChannelFolder1 i can use the path to get back the id of the folder so i can get the contents ?
ie can i access the contents and details of this folder by using something like
similar to what onedrive offers,
https://graph.microsoft.com/v1.0/me/drive/root:/" + path + "/" \
No RepliesBe the first to reply