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.

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

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 33,641 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.