web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Dynamically get Hub Si...
Power Automate
Unanswered

Dynamically get Hub Site ID for the join hubsite connector

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am creating a flow that creates a project site and then dynamically joins it to a hub site and ideally I want the hubsite ID to be entered in the Flow dynamically. Is there a way to do this either with the standard connectors or Plumsail connectors?

 

Thanks in advance,

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,853 Most Valuable Professional on at

    Hi @Anonymous,

     

    Just to double check. What do you mean by dynamically entering the hub site id? 

     

    Do you first want to retrieve a list of existing hub sites and use one of those values in your flow. Or do you mean that the flow requires user input field (where the hub site can be entered) when it is triggered?

     

    For the first scenario you could use one of the methods of the HubSites REST API:

    https://docs.microsoft.com/en-us/sharepoint/dev/features/hub-site/hub-site-rest-api

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Expiscornovus ,

     

    We are using the join hub site connector and need to get the hub site ID dynamically as the hub site being joined can change.

     

    Thanks,

  • Expiscornovus Profile Picture
    33,853 Most Valuable Professional on at

    Hi @Anonymous,

     

    Like suggested in my previous reply. You could list the existing hub sites and dynamically pick one of those.

     

    Below is an example of that approach. In that example I am retrieving all the hub sites (via the Send an HTTP request to SharePoint action).

     

    In the Join hub site I am retrieving the ID of the second hub site that is listed in the response of that request via the following expression.

     

    outputs('Send_an_HTTP_request_to_SharePoint')?['body']['d']['results'][1]['ID']

     

    hubsiteid.png

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I implemented this but it gets the first hubsite ID from the output but we will have multiple hubsites so the hubsite we need won't always be the first hubsite in the output

  • Expiscornovus Profile Picture
    33,853 Most Valuable Professional on at

    Hi @Anonymous,

     

    I got a question for you 😀. How do you determine which project site needs to be associated with which hub site?

     

    If there is some logic behind that we can probably automate it 😁

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 791

#2
Valantis Profile Picture

Valantis 568

#3
Haque Profile Picture

Haque 535

Last 30 days Overall leaderboard