Skip to main content

Notifications

Community site session details

Community site session details

Session Id : ZmOMC7ZbgTUOpLqf42qiPP
Power Apps - Building Power Apps
Unanswered

Get ID of existing SharePoint folder?

Like (1) ShareShare
ReportReport
Posted on 17 Mar 2022 14:54:29 by 51

How do I get the ID of an existing folder, for use with the SharePoint "Create sharing link for a file or folder" step?

 

I've seen an example of how to do it in the same flow as when a folder is created, but I can't figure-out how to do it for an existing folder.

Categories:
  • CU23070452-1 Profile Picture
    on 15 Feb 2023 at 14:16:16
    Re: Get ID of existing SharePoint folder?

    Hi @roxy1 , 

    I have read your other post as well, and I don't have an answer to your issue yet. I was using plain paths, not sharing links.

     

    The path that works in "Get folder metadata using path" begins with "Shared documents/" (depending on the language).

  • roxy1 Profile Picture
    195 on 09 Jan 2023 at 04:47:00
    Re: Get ID of existing SharePoint folder?

    Hi @Sami_J - could you expand further on your variables used in your flow for this? I am having trouble getting the using the 'get folder metadata using path'. I have initialize a string variable which then has the input of a shared link that is manually entered in a sharepoint list.  I have also posted this as a stand alone query

  • CU23070452-1 Profile Picture
    on 04 Jan 2023 at 17:36:00
    Re: Get ID of existing SharePoint folder?

    I didn't say it doesn't work, just that the question has this flow aspect that was not replied to. Let's read the part of the question by @bassman99 again carefully, it is about Power Automate:

     

    "I've seen an example of how to do it in the same flow as when a folder is created, but I can't figure-out how to do it for an existing folder."


    I had exactly the same situation. I knew Create folder action is returning the folder ID, but how about when the folder already exists and you need that ID, for creating a sharing link for example?

     

    Get folder metadata using path -> ItemId

     

    SP sharing link - Get folder metadata using path edit.png

    The Folder Path needs to begin with "Shared Documents/"  (if the language is English).

     

    I still have to dig deeper into SharePoint actions, why some require ID and some path. Also, actions that ask for document library, may have different folder path to fill in that with those that only ask site address. I'm trying to find the consistency, or proof of the lack of consistency 🙂

  • OGnerfherderWTF Profile Picture
    2 on 03 Jan 2023 at 22:54:46
    Re: Get ID of existing SharePoint folder?

    @Sami_J the method ^^ worked for me when tried, just had to show the column and then the values displayed. maybe its a permissions issue within your environment?

  • CU23070452-1 Profile Picture
    on 03 Jan 2023 at 14:30:05
    Re: Get ID of existing SharePoint folder?

    Hi,

    you didn't reply to the question. It was about getting an existing folder ID for Power Automate action "Create sharing link for a file or folder".

  • nerfherder Profile Picture
    128 on 20 Oct 2022 at 06:09:09
    Re: Get ID of existing SharePoint folder?

    u rock. thank you!

  • bassman99 Profile Picture
    51 on 18 Mar 2022 at 09:42:51
    Re: Get ID of existing SharePoint folder?

    Thanks!

  • Adrian_Celis Profile Picture
    1,652 Super User 2025 Season 1 on 18 Mar 2022 at 02:00:13
    Re: Get ID of existing SharePoint folder?

    Hi @bassman99 

    If you go to your SharePoint list, click on the Add Column section and click 'Show/hide Columns'

    Adrian_Celis_0-1647568678310.png

     

    Check the ID option

    Adrian_Celis_1-1647568776531.png

     

    You should now be able to see the ID of the folder from the list.

     

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 89 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 60

#3
stampcoin Profile Picture

stampcoin 48

Overall leaderboard