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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Searching if email is ...
Power Automate
Answered

Searching if email is in the sharepoint group

(0) ShareShare
ReportReport
Posted on by 899 Moderator

Hello,

I have this instant flow that is triggered in powerapps that will check if the current logged in user is part of the sharepoint group. The problem with my flow is that when a group contains multiple members it returns true and when it doesn't have any member in the group it returns false regardless if the email is in the group or not. 

First, I initialize a boolean value to false.

then send an HTTP request to Sharepoint that filters the emails
with GET method
Uri : 

 

_api/web/sitegroups/getByName('GROUP')/Users?filter=Email eq '@{triggerBody()['text']}'

 

 

then a compose action with the expression

 

@{body('Send_an_HTTP_request_to_SharePoint')['d']['results']}

 

 

after that a condition to check if the array is empty

 

equals(String(outputs('Compose')),'[]')

 


and if it is empty, the variable will be false meaning the user is not part of the group.

Categories:
  • Verified answer
    Expiscornovus Profile Picture
    33,997 Most Valuable Professional on at

    Hi @kej,

     

    It looks like you made a small typo. It seems that you forgot the $ for the filter query parameter in your URI field. It should be $filter instead of filter.

     

    Btw, it is not necessary to use a Compose action for this setup. You can use an expression directly in the Condition action as well.


    Try something like below.

     

    1. I used this Uri

     

     

    _api/web/sitegroups/getByName('Custom SharePoint Group')/Users?$filter=Email eq '@{triggerBody()['text']}'

     

     

     

    2. I added the nometadata headers. This way it will return the value property instead of the d/results property format.

     

     

    {
     "Accept": "application/json;odata=nometadata",
     "Content-Type": "application/json;odata=nometadata"
    }

     

     

     

    3. In the condition I used a length function to check if the value array contains any items at all.

     

     

    length(outputs('Send_an_HTTP_request_to_SharePoint')?['body']['value'])

     

     

    is greater than 0

     

    filterqueryparameter.png

  • KevinGador Profile Picture
    899 Moderator on at

    worked wonderfully! also appreciate the explanation while you teach the right thing to do.  

    Thanks @Expiscornovus 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 249 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 198

#3
David_MA Profile Picture

David_MA 197 Super User 2026 Season 2

Last 30 days Overall leaderboard