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 / Check if SharePoint Re...
Power Automate
Answered

Check if SharePoint Rest API results are blank

(0) ShareShare
ReportReport
Posted on by 10

Hi All,

I have a flow where I am testing if a user belongs to a SharePoint group and then creates an array of the groups they belong to.

Do do this I am filtering through an Array of all groups as below and then I want to check if the results from this HTTP request are blank (equal to "[]") as shown below.

 

LinkToTheAsh__0-1621512720411.png


The outputs of a (_api/web/sitegroups/GetByName('GroupName')/Users?$filter=Email eq 'EmailAddress') when the group doesn't contain this user looks like this.

 

 

{
 "d": {
 "results": []
 }
}

 

 

However Power Automate see's this "[]" parameter as an array and won't perform the check. How can I create a condition that check if these results are blank?

I've tried using double and single quotes around the square brackets, I've tried "null" as well as leaving the parameter empty but no luck.

Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,757 Most Valuable Professional on at

    Hi @LinkToTheAsh_,

     

    In your condition action you could check for the length of the response. If it is equal to 0 it is empty.

    length(outputs('Check_if_Buyer_is_a_Member')?['body/d/results'])

     

    isequalto0.png

     

  • LinkToTheAsh_ Profile Picture
    10 on at

    @Expiscornovus  that worked perfectly, so simple I feel like banging my head against the wall now haha. Thank you. 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 250 Super User 2026 Season 1

#2
Expiscornovus Profile Picture

Expiscornovus 222 Most Valuable Professional

#3
Haque Profile Picture

Haque 174

Last 30 days Overall leaderboard