cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

Pars or Filter HTTP request

Using this action I get a lot of information that includes all the URL's that my id has access too, but all I want is the URL's.  How can I filter out all the other information?

 

HTTPrequest.png

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Pars or Filter HTTP request

Hi @send2mark 

 

Here is a Sample POC:

 

Following this guide:

https://social.technet.microsoft.com/wiki/contents/articles/53583.power-automate-flow-calling-ms-gra...

to setup the Azure App registration, The only difference I made was to the permissions. When selecting App permissions in steps 13.

I am using Site permissions:

Jcook_0-1601062896796.png

 

Now, creating the Flow,

All we need to use now is HTTP action, and fill in the information just like the guide. Here is what mine looks like based on the Graph Call for Sites:

URI: https://graph.microsoft.com/v1.0/sites?search=*

Authority: https://login.microsoft.com

Audience: https://graph.microsoft.com

**All other fields should be populated by the values from your App registration**

(You can use variables or Integrate Azure Keyvault for your secret)

In my demo I am passing values directly into the HTTP action, this is fine for tenantID and clientID. For better security on passing your Secret, check out my blog post on integrating and grabbing Azure Secrets to pass into actions securely

https://flowaltdelete.ca/2020/06/08/grab-azure-key-vault-secrets-securely/

 

Jcook_1-1601063007874.png

Run the Flow and make sure the Request comes back successful with data. Copy the outputs from the HTTP action.

Now we get the details we need in JSON. So to grab details more easily we add a Parse JSON action, click on Generate from sample button, and paste in the Outputs from the HTTP action

 

ParseJSON.png

 

 

 

 

 

 

 

 

 

 

Now we can select dynamic content from the results:

Dynamic Content.png

 





Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




View solution in original post

8 REPLIES 8
Highlighted
Super User III
Super User III

Re: Pars or Filter HTTP request

Hello @send2mark 

 

Could you provide a sample of what is being outputted, and the value you want. Thanks





Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




Highlighted
Resolver I
Resolver I

Re: Pars or Filter HTTP request

Basically, I am trying to get all the site collections and properties in the way of a list. I am not even getting all the site collections returned, so I am not sure if this is going to work.

 

api-results.png

Highlighted
Super User III
Super User III

Re: Pars or Filter HTTP request

Hi @send2mark 

 

You most likely will need to be an owner of all Sites to access everything.





Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




Highlighted
Resolver I
Resolver I

Re: Pars or Filter HTTP request

I am the site collection admin on all of them.

Highlighted
Super User III
Super User III

Re: Pars or Filter HTTP request

Hi @send2mark 

 

Unfortunately, it seems like these types of graph calls will not work in the SharePoint HTTP Request action.

 

I was able to use graph and list every site. Using this call:

https://graph.microsoft.com/v1.0/sites?search=*

This call returned:

Jcook_0-1601058827928.png

 

 Please try this call in graph explorer, and see if its what you are looking for:

https://developer.microsoft.com/en-us/graph/graph-explorer

 

 

If it is, you will have to use HTTP action in Flow. Which requires you to have some type of authentication. Azure Application registration can be used here:

https://social.technet.microsoft.com/wiki/contents/articles/53583.power-automate-flow-calling-ms-gra...

Its a long and tedious process to have to setup this authentication.

 

If the above call is not what you are looking for, you might need to provide more details. Thanks 





Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




Highlighted
Resolver I
Resolver I

Re: Pars or Filter HTTP request

If using Azure Application registration is my only option in Power Automate then I would like to explore that. The results looked good in Graph. Can you show me what the Flow would look like?

Highlighted
Super User III
Super User III

Re: Pars or Filter HTTP request

Hi @send2mark 

 

Here is a Sample POC:

 

Following this guide:

https://social.technet.microsoft.com/wiki/contents/articles/53583.power-automate-flow-calling-ms-gra...

to setup the Azure App registration, The only difference I made was to the permissions. When selecting App permissions in steps 13.

I am using Site permissions:

Jcook_0-1601062896796.png

 

Now, creating the Flow,

All we need to use now is HTTP action, and fill in the information just like the guide. Here is what mine looks like based on the Graph Call for Sites:

URI: https://graph.microsoft.com/v1.0/sites?search=*

Authority: https://login.microsoft.com

Audience: https://graph.microsoft.com

**All other fields should be populated by the values from your App registration**

(You can use variables or Integrate Azure Keyvault for your secret)

In my demo I am passing values directly into the HTTP action, this is fine for tenantID and clientID. For better security on passing your Secret, check out my blog post on integrating and grabbing Azure Secrets to pass into actions securely

https://flowaltdelete.ca/2020/06/08/grab-azure-key-vault-secrets-securely/

 

Jcook_1-1601063007874.png

Run the Flow and make sure the Request comes back successful with data. Copy the outputs from the HTTP action.

Now we get the details we need in JSON. So to grab details more easily we add a Parse JSON action, click on Generate from sample button, and paste in the Outputs from the HTTP action

 

ParseJSON.png

 

 

 

 

 

 

 

 

 

 

Now we can select dynamic content from the results:

Dynamic Content.png

 





Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




View solution in original post

Highlighted
Resolver I
Resolver I

Re: Pars or Filter HTTP request

Thanks for going the extra mile with me here.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Users online (5,782)