How can i get a Sharepoint Folder / document library Id by path?

Occasional Contributor

I am getting sharepoint folders by using the graph api as follows

The structure is as follows:


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:

This give me back Json data with id, displayname etc.

I the call{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," + path + "/" \


0 Replies