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 / How to filter results ...
Power Automate
Unanswered

How to filter results of an HTTP request?

(1) ShareShare
ReportReport
Posted on by 161
Hi, I have an HTTP Graph request which gets all my Office 365 users. Now, I'd like to filter out those that don't have a specific email extension (.e.g. @contoso.onmicrosoft.com) since the HTTP request also returns users external to our tenant. So far I have used a Select action to select the display name and email address. But, how can I select only those objects which meet the email filter criteria? Thanks for your help.
Categories:
I have the same question (0)
  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi @colonel_claypoo,

     

    Please just take a try with the data operations –Filter array action.

    Using this action could help reduce the number of objects in an array to a subset that matches the criteria you provide.

    Here is the doc for your reference:

    https://docs.microsoft.com/en-us/flow/data-operations#use-the-filter-array-action

     

    Best regards,

    Mabel

  • colonel_claypoo Profile Picture
    161 on at

    Hi @v-yamao-msft,

     

    thanks for your reply.

    Unfortunately, the HTTP action returns an object and thus I can't get the filter action to work.

     

    Doing:

    chrome_2019-01-09_13-06-29.png

    gives the following error:1.png

     

    Changing the expression to @contains(body('HTTP')['value']['mail'], 'com')

     

    I also tried putting the filter condition in the expression of the Select action but also to no avail:

     

    chrome_2019-01-09_13-11-28.pngchrome_2019-01-09_13-09-30.png

     

    There must be something I'm getting wrong that I'm not seeing.

    Any ideas?

     

    Thanks!

     

  • misterpower Profile Picture
    34 on at

    I ran into this topic while trying to find out how to filter HTTP REST requests in combination with Business Central. You can filter the results of your HTTP request by conforming to the API guidelines specified in the following documentation: https://github.com/Microsoft/api-guidelines/blob/master/Guidelines.md#97-filtering.

     

    Your filter will look as below. In the query, use $filter as parameter instead of the fields. Your value will contain the complete REST filter string. 

     

    HTTP1.png

    When executed, it looks as following:

     

    HTTP2.png

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
Haque Profile Picture

Haque 67

#2
David_MA Profile Picture

David_MA 64 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 39 Most Valuable Professional

Last 30 days Overall leaderboard