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 compare properl...
Power Automate
Unanswered

How to compare properly 2 arrays of values

(0) ShareShare
ReportReport
Posted on by 6
 
 
Hi,
 
In the flow I am currently developing I have 2 arrays. These 2 arrays are initalizaed as follows





Then I fill the 2 arrays the wtih a list of strings



This is the output of the Set Value

{
    "body": {
        "name": "SysperGroupList",
         "value": [
            "user1@gmail.com",
            "user2@gmail.com"
       ]
    }
}
 
 
{
    "body": {
        "name": "EntraIDGroupList",
         "value": [
            "user1@gmail.com",
            "user2@gmail.com"
       ]
    }
}

After that my purpose is to compare the 2 ararys as follows. 
 
Iterate on each member of SysperGroupList and check if the value is the array EntraIDGroupList as follows



 


I think evertyhing untl here does take sense but I am doing somwwthing wrong beacuse despite the 2 arreays have the same condition the coniditional expresssion gives a False result



Why_ What is wrong on the expression 
 
contains(variables('EntraIDGroupList'), items('_Compare_SysperGroupList_to_EntraIDGroupList'))

Any idea about how to find what is going wrong there?

Thanks
Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,891 Most Valuable Professional on at
     
    If you want to compare two arrays you could also use different methods without apply to each loops.
     
    @DamoBird365 has created a nice blog post about his approach. 
     
     
    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, LinkedIn, Bluesky profile or Youtube Channel
  • Chriddle Profile Picture
    8,708 Super User 2026 Season 1 on at
    You are looking for an intersection.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard