cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SebastianN
New Member

Unable to filter into array via 'Search for users (V2)'

Hi,

 

I cannot get the search for users to pass on a specific field's information in a loop (apply to each)

I eventually want to use it to update a row in an Excel list, but after various tries I cannot get the information to be passed on into an array. I can get this to work if it's only one user, but instantly when I need it to go through a bunch of emails, it won't do what I need; to pick out the department based on the users email addresses. I have tried various ways, this is where I am at now. Anyone know how to solve this?

 

 

Screen Shot 2021-10-28 at 18.11.51.png

1 ACCEPTED SOLUTION

Accepted Solutions
ekarim2020
Super User
Super User

If you need the users department, you can easily get this using an expression:

2021-10-28_22-57-04.png

You should be able to copy-and-paste this expressions into your flow:

outputs('Search_for_users_(V2)')?['body/value'][0]['Department']

 

Here is an example run, which returns the department Retail for user 

2021-10-28_23-00-44.png


Ellis

 


____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

3 REPLIES 3
ekarim2020
Super User
Super User

Does the email column contain multiple email addresses? If so, how is each email address separated from another?

2021-10-28_20-09-38.png

Can you post some sample Excel data?

Ellis

SebastianN
New Member

Hi Ellis,

 

The Excel file's data is in a table and contains one email per row in the "eMail" column.

The 'Search for Users (V2)' request goes through, but it's the step after that I cannot get to work...

 

/ Sebastian

ekarim2020
Super User
Super User

If you need the users department, you can easily get this using an expression:

2021-10-28_22-57-04.png

You should be able to copy-and-paste this expressions into your flow:

outputs('Search_for_users_(V2)')?['body/value'][0]['Department']

 

Here is an example run, which returns the department Retail for user 

2021-10-28_23-00-44.png


Ellis

 


____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,232)