cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dmistry
Post Prodigy
Post Prodigy

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 @dmistry 

 

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
Super User
Super User

Hello @dmistry 

 

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 @dmistry 

 

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

 

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

 

Untitled.png

 

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

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

@dmistry 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.

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

Howdy @dmistry 

 

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

@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 @dmistry,

 

do not use PARSE JSON but use this:

 

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

 

excellent, thanks so much @VictorIvanidze 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (3,798)