I have a SharePoint list where I have "Username" and "Email Address". I need to create a gallery that displays the list but it only displays Users from that list who still have an active office 365 account. I'm then needing to have a function where I could prune the users from the SharePoint list that aren't active any longer in AD, so have say a "prune disabled accounts" button that would remove any users who are in the SP list that are no longer in AD/Office365users.
I've toyed around with showing a gallery and then checking the list vs if the account is active and returning a true / false to a label in the gallery but I'm not sure how I then can filter that gallery based on that because it said something about circular references which I know I'm doing something wrong but just not sure how to fix it.
Here is what I'm using to show users from the SP List in the gallery and then the label that shows them as accountEnabled "true / False"
I was actually just exploring the option to create a flow that would lookup the users and if they are active to write a column item and then just filter it with PowerApps but I'm not sure how to do that.
The syntax of putting things together is where I struggle right now because I'm pretty new to Coding and Powerapps syntax. So it's a ton of trial and error on my end.
So any idea on the flow I'd create to do the list update? @RezaDorrani