web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : KNfLi1oiPoErjw5lOc7PGj
Power Automate - Building Flows
Answered

Power Automate - O365 Groups activities - Get group ID

Like (0) ShareShare
ReportReport
Posted on 23 Nov 2021 17:14:52 by 19

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

I have the same question (0)
  • stayinginsync Profile Picture
    139 on 29 Mar 2022 at 21:02:38
    Re: Power Automate - O365 Groups activities - Get group ID

    Reply removed.  Created a new post instead - 

     

    https://powerusers.microsoft.com/t5/Building-Flows/JSON-not-parsing-correctly-for-Get-HTTP-Request-Groups-Preview/m-p/1524194#M170437

  • ztfcity Profile Picture
    3 on 14 Jan 2022 at 06:06:23
    Re: Power Automate - O365 Groups activities - Get group ID

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

  • VictorIvanidze Profile Picture
    12,562 on 30 Nov 2021 at 14:20:09
    Re: Power Automate - O365 Groups activities - Get group ID

    Glad to help.

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

  • na44 Profile Picture
    19 on 30 Nov 2021 at 14:18:13
    Re: Power Automate - O365 Groups activities - Get group ID

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

  • Verified answer
    VictorIvanidze Profile Picture
    12,562 on 30 Nov 2021 at 14:06:25
    Re: Power Automate - O365 Groups activities - Get group ID

    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'

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete