cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Parulkhattar
Frequent Visitor

Get user information from name in excel

Hi,

I have excel where the names of various task owners are listed in a column and while trying to retrieve the email address, I am getting empty response.

Can anyone help?

Would search for users option not work ?

I am basically searching for GAL sync with my flow.

 

 

8 REPLIES 8
Rhiassuring
Super User
Super User

Hi there, 

 

Is your Excel sheet set-up with a Table? That will be step one. Are we able to see how your Excel sheet is currently formatted (anonymized, of course)?

Is it that you have your Task Owner names in Excel, and are trying to use Power Automate to determine the appropriate email address for them?

______________________________________________________________


Did this answer your question? Please mark it as the solution.
Did it contribute positively towards finding the final solution? Please give it a thumbs up.

I answer questions on the forum for 2-3 hours every Thursday!



grantjenkins
Community Champion
Community Champion

You should be able to use the Search for users (V2) action if you have the actual display name of the users in your Excel file.

 

In my example below I have a Table in my Excel file called TaskOwners that contains the following columns/data.

 

grantjenkins_0-1666934757064.png

 

In my flow I am listing the rows in the Excel Table, and for each one searching for the users which does indeed return a user object for each person in the list.

 

grantjenkins_1-1666934900476.png

 

Is this what you were trying to achieve, or did you have something else?



----------------------------------------------------------------------

If I've answered your question, please mark the post as Solved.

If you like my response, please consider giving it a Thumbs Up.
Parulkhattar
Frequent Visitor

Hi,

My excel does has a table with the following column as:

Parulkhattar_0-1666938362450.png

And the flow does look like

Parulkhattar_1-1666938440626.png

 

Parulkhattar_2-1666938489924.png

 

I realised that the problem is that the data might be case sensitive since for my organisation, if data is in format [Last_name, First_name] I get the correct output while if format is [First_name Last_name], I am getting empty output.

 

Parulkhattar_3-1666938742790.png

 

Hi,

My flow does have a table in it but it seems if the respective searched cell data is case sensitive.

Please check my comment below for flow I am using. 

Hi,

Are you getting the user details for both of the entries Grant Jenkins and Adele Vance?

Because for me it is not working.

Check when the input is in format [Last_name, First_name]

 

Parulkhattar_4-1666939427639.png

 

grantjenkins
Community Champion
Community Champion

Mine works for both because the names in my Excel file exactly match the format of Display Name in AD. If you have different variations of the names in Excel (not necessarily matching the exact Display Name) then that makes it tricky.

 

You might be able to do something with the Graph API endpoints.



----------------------------------------------------------------------

If I've answered your question, please mark the post as Solved.

If you like my response, please consider giving it a Thumbs Up.
David_MA
Impactful Individual
Impactful Individual

I have a flow to check if users are active in our system based on a report I get of people who have created flows in one of our environments. Like @grantjenkins, I am searching for the exact display name as it is in our AD and don't have any issues. Are you getting empty responses for everything or just some items? If it is just some, did you check to make sure their accounts are still active? Getting an empty response is not necessarily an error.

 

As a suggestion, I would update your spreadsheet to use names where you know the person exists in your environment and ensure they're formatted the same as in your AD. That should at least tell you whether you have configured the flow correctly. My flow is pretty much the same as what you show. I just have logic to check if the search for users action returned any results and then I update the spreadsheet accordingly. The expression in the compose action is length(outputs('Search_for_users_(V2)')?['body/value']).

 

capture_28-10-2022_12632_make.powerautomate.com.jpg

When the above ran yesterday the spreadsheet had 36 rows. It found 34 active accounts and 2 inactive. For the inactive ones it returns this, which I assume you are describing as the empty response:

Web capture_28-10-2022_121351.jpg

 

 Good luck!

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,997)