Which graph api should I use to get metadata of "https://mydomain.sharepoint.com/:f:/t/SFDCAccounts/EjQ76JtPecJIvS1RuFOSCkABipyahnC20K4D_KyiZTny4w?e=OJed53"

Island Chen 0 Reputation points

Hi everyone,

I have some URLs whose formats are like "https://mydomain.sharepoint.com/:f:/t/SFDCAccounts/EjQ76JtPecJIvS1RuFOSCkABipyahnC20K4D_KyiZTny4w?e=OJed53". They actually point to a SharePoint folder. I need to use the Graph API to get the metadata from this URL, for example, the folder path. The problem is that I don't know what "EjQ76JtPecJIvS1RuFOSCkABipyahnC20K4D_KyiZTny4w" refers to!

I tried to use it as a DriveItem or List identifier, but I received an "itemNotFound" error for both attempts. Which API should I use? I really appreciate any help you can provide.

A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
7,130 questions
Microsoft Graph Files API
Microsoft Graph Files API
A Microsoft API to create an app that connects with files across OneDrive, OneDrive for Business, and SharePoint document libraries.
354 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 20,061 Reputation points Microsoft Vendor

    Hi @Island Chen

    You can use the following api to get the drives id


    Then you try following api to get all items in the root folder


    The api will return you the url of the folder

    User's image

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

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.