cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
na44
New Member

Power Automate - O365 Groups activities - Get group ID

Hello

I am very new to O365 tools, but I am looking to automate an approvals process and retrieve personal O365 email addresses from a distribution group.

I tried two solutions, none of which worked for me due to lack of knowledge.

Test 1: I wanted to use the O365 Groups activities connector so I didn't need to authenticate.

I have the distribution email address, and want to use the 'List Group members' activity

UKT0m.jpg

In order to use it I need to get the ID dynamically for the specific distribution email address.

I tried using the O365 Send Http Request which uses the graph groups, I tested the request in the Graph explorer, all worked well.

EU5OP.jpg

However when I use it in the power automate flow I get the error message below.

the URI is

 

 

 

 

 

https://graph.microsoft.com/v1.0/groups?$filter=mail eq 'my_email@xx.com'

 

 

 

 

 

the error is URI path is not a valid Graph endpoint, path is neither absolute nor relative or resource is not one of the supported (me, users, groups, sites, search, planner, teams, chats): https://graph.microsoft.com/v1.0/groups?$filter=mail eq 'my_email@xx.com'

g1Jzx.jpg

 

Here I have also tried replacing spaces with %20 URI https://graph.microsoft.com/v1.0/groups?$filter=mail%20eq%20'my_email@xx.com', with no luck.

 

I tried putting the URI in a variable, same problem. I tried adding ConsistencyLevel: eventual and $count=true in case the issue was to do with filter being an advance query capability, same error as above.

 

The only thing that worked was if I use the URI without the OData query, e.g. https://graph.microsoft.com/v1.0/groups

That means that I can fetch all the groups but not a specific one. The problem that I faced here is that this only returns the first 100 results, not the whole list of groups, therefore I am unable to work with filtering the JSON file later on in the flow, and of course I cannot use the $top query option as I'm faced with the above error.

URI path is not a valid Graph endpoint, path is neither absolute nor relative or resource is not one of the supported (me, users, groups, sites, search, planner, teams, chats): https://graph.microsoft.com/v1.0/groups?$top=200

 

Test 2

I used a generic HTTP request for the URI with the filter https://graph.microsoft.com/v1.0/groups?$filter=mail eq 'my_email@xx.com' and it worked. However I didn't know how to authenticate, so copied the temporary Bearer token from Graph explorer for testing purposes, but obviously it expired so I cannot use this solution.

I tried using Basic authentication using the O365 email and password, but the HTTP request failed with error CompactToken parsing failed with error code: 80049217.

 

My question is please could you help me with why the Test 1 might not be working in power automate when working fine in Graph explorer, or why the basic authentication isn't working for Test2?

Thank you!

J

1 ACCEPTED SOLUTION

Accepted Solutions
VictorIvanidze
Community Champion
Community Champion

Hi @na44,

 

I think you have already noticed the action "Send an HTTP request (Preview)" is quite buggy.

 

Just add a slash between /groups and ?: 

 

https://graph.microsoft.com/v1.0/groups/?$filter=mail eq 'my_email@xx.com'

 

 

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

View solution in original post

5 REPLIES 5
VictorIvanidze
Community Champion
Community Champion

Hi @na44,

 

I think you have already noticed the action "Send an HTTP request (Preview)" is quite buggy.

 

Just add a slash between /groups and ?: 

 

https://graph.microsoft.com/v1.0/groups/?$filter=mail eq 'my_email@xx.com'

 

 

--------------------------------------------------------------------------------------
Contact me if you are interested in custom Power Automate development.
na44
New Member

Thank you SO much @VictorIvanidze , I am so grateful, it all works now!!!

VictorIvanidze
Community Champion
Community Champion

Glad to help.

(I've spent 6 hours to localize this f... bug)

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

I found this buggy too,it works for me ,thanks!!

stayinginsync
Helper II
Helper II

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.

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.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (4,657)