Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Dynamically get Hub Site ID for the join hubsite connector

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,

Super User
Super User

Hi @bthomas,


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:

Frequent Visitor

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.



Super User
Super User

Hi @bthomas,


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.







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

Super User
Super User

Hi @bthomas,


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 😁

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (4,889)