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.
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?
I answer questions on the forum for 2-3 hours every Thursday!
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.
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.
Is this what you were trying to achieve, or did you have something else?
My excel does has a table with the following column as:
And the flow does look like
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.
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.
Are you getting the user details for both of the entries Grant Jenkins and Adele Vance?
Because for me it is not working.
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.
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']).
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:
Keep up to date with current events and community announcements in the Power Automate community.
A great place where you can stay up to date with community calls and interact with the speakers.
Check out the latest Community Blog from the community!