I have a flow that I want to remove users from a group if they don't exist in an excel file.
Currently I have:
List Rows (Excel) - Actual Name - Select Excel Rows
List Group Members (for the 365 group) - Actual Name - Select Group Members
I then select the emails from both of these. I have compose set up to view the outputs and I can confirm they both output exactly like the below:
[
{
"Email": "user123@mydomain.com"
},
{
"Email": "user456@mydomain.com"
}
]
So if user123@mydomain.com is in the group but not in the excel, this will then go to an apply to each to be removed from the group.
I have tried SO many things now and for the life of me I can't get this filter array to work correctly.
As far as I am aware, the below should work:
@not(contains(outputs('Select_Excel_Rows'), item()?['Email']))
But this won't let me add it as an expression. Whenever I get it 'working' it just doesn't have an output so removes all of the users.
Any help would be greatly appreciated!
TIA


Report
All responses (
Answers (