cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

how to get the correct graph uri

Hi,

 

I am working on the http call leveraging graph api, for some reason getting invalid uri, see screenshot below.

 

Capture.JPG

 

What would be the correct uri here? I know the display name of the o365 group so trying to pass that to get the id using parse json action next, when I run the same from graph explorer, it returns the results correctly so not following why its not working here, can someone help with correct uri here please, thanks. 

1 ACCEPTED SOLUTION

Accepted Solutions

Howdy @Anonymous 

 

As promised, I have tested your URL and to be honest I also had some trouble.

 

So, I recreated your filter 

https://graph.microsoft.com/v1.0/groups?$filter=startswith(displayName,'<YourGroupName>')&$select=id

 

CFernandes_0-1598258587452.png

 

Will this option work for you.?

 

CFernandes_1-1598258744849.png

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

 

 

View solution in original post

10 REPLIES 10
Jcook
MVP

Hello @Anonymous 

 

There should be no spaces in a URI replace spaces with %20


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





CFernandes
Super User
Super User

Hi @Anonymous 

 

The best way to get the correct URI is to use the graph explorer

 

Untitled.png

 

I have a blog in which I demonstrate how to use Graph API in Power Automate, you can find it at https://clavinfernandes.wordpress.com/2020/05/04/exporting-chats-from-microsoft-teams-using-power-automate/

 

On a side note, I prefer using ‘HTTP with Azure AD‘ connectors

 

Untitled.png

 

Anonymous
Not applicable

thanks @Jcook I tried replacing uri as https://graph.microsoft.com/v1.0/groups?$filter=displayName%20eq'testingmonday'&$select=id but it still gives me error as 'invalid filter clause'.

Anonymous
Not applicable

thanks @CFernandes the uri posted in screenshot works well in graph explorer but does not in flow http.

@Anonymous Are u using the http action or the "http with azure ad" action? I will also give this a try on Monday and let you know my findings.

Anonymous
Not applicable

THanks for the response @CFernandes , i am using the http action.

Howdy @Anonymous 

 

As promised, I have tested your URL and to be honest I also had some trouble.

 

So, I recreated your filter 

https://graph.microsoft.com/v1.0/groups?$filter=startswith(displayName,'<YourGroupName>')&$select=id

 

CFernandes_0-1598258587452.png

 

Will this option work for you.?

 

CFernandes_1-1598258744849.png

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

 

 

Anonymous
Not applicable

@CFernandesthanks a lot, this works great. One more help, see below. I am trying to collect ID from parse json and set it to a string variable but variable is getting logged as blank, can you see what;s missing here. 

 

Capture.JPG

Capture.JPG

Hi @Anonymous,

 

do not use PARSE JSON but use this:

 

body('HTTP')['value'][0]?['id']

 

--------------------------------------------------------------------------------------
Contact me if you are interested in custom Power Automate development.
Anonymous
Not applicable

excellent, thanks so much @VictorIvanidze 

Helpful resources

Announcements
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.

Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022- Season 2 has kicked off!

Users online (2,928)