cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Martin_MC
Level: Powered On

Office 365 User Search Issue. Body Returns []

Hi.

 

In relation to the 'Search for Office 365 User' function within Flow, I've seen a number of people say that "If an employee is not in AD, the response is Body: []".

 

However I'm finding that the response body for one particular flow / user is [] even though they are in AD. And I'm wondering if anyone knows why this might be? This was brought to light yesterday and so I checked the users AD object and saw that - while it existed and was active - it had some field data missing (Job Title, Department etc) so my go-to thought was that this was the reason Flow struggled to identify him as a user. However I put data into those fields yesterday, and today the user still does not receive the emails from flow that they should, and the body is still [] .

Note that the exact same flow works for dozens of other people, so the I know the flow works.


Is anyone able to explain this or suggest any fix at all?

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft rimatos
Microsoft

Re: Office 365 User Search Issue. Body Returns []

HI @Martin_MC ,

 

As @edgonzales mentioned, try and verify if the value of both the output from SharePoint and of the Dynamic content you are using is the intended one.

 

It could be that the calculation of the Display Name for those specific users is not being processed correctly resulting in an incorrect output from SharePoint, or the Dynamic Value itself is not referencing correctly the output from SharePoint, which is giving you misleading results.

 

Additionally, verify if the Display Name does not contain any special characters or blank spaces that are not supposed to appear, which could lead to incorrect matching with Azure AD.

 

 

Let me know if this helped!

 

Regards,

Ricardo

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Office 365 User Search Issue. Body Returns []

@Martin_MC 

Hi there.  How is the AD being searched?  For an eMail address or something else?  Can we see the flow and maybe what the outputs look like in the previous step?  That might help figure things out.


Thanks!

-Ed

 

 

Martin_MC
Level: Powered On

Re: Office 365 User Search Issue. Body Returns []

Hi @edgonzales and thanks for the response.

 

So the Search for User object within the flow references the Payroll Officer value in a particular SharePoint list, which itself is a lookup field referencing the Display Name field of the Payroll Officer SharePoint list, which is calculated from the First Name and Last Name columns within that same list.

 

This is how it was set up in the beginning, which admittedly isn’t perfect considering the fact that the user lookup is not referencing any unique identifiers such as email or ID. However, it worked all through the setup and testing phases and it works for everyone else in the business even now. It simply doesn’t work for one or two users. For those users, the body of the flow object returns [] rather than information on the user. I know we can update the flow to search on more unique identifiers, but I’m wondering how and why this issue happens for 1% of users yet is fine for the rest. Note there is no conflict or issue or duplication in the naming of the users on the list or in AD; their name is correct.

 

1.png2.png
3.png

Super User
Super User

Re: Office 365 User Search Issue. Body Returns []

Ah, ok.  I think I get it.

So when you look at past runs, Is there data being passed from the SharePoint list to the O365 step?  Check for output on the SP action, and then match that up to input on the O365 action.  My guess is that there is a hole somewhere.

 

-Ed-

Microsoft rimatos
Microsoft

Re: Office 365 User Search Issue. Body Returns []

HI @Martin_MC ,

 

As @edgonzales mentioned, try and verify if the value of both the output from SharePoint and of the Dynamic content you are using is the intended one.

 

It could be that the calculation of the Display Name for those specific users is not being processed correctly resulting in an incorrect output from SharePoint, or the Dynamic Value itself is not referencing correctly the output from SharePoint, which is giving you misleading results.

 

Additionally, verify if the Display Name does not contain any special characters or blank spaces that are not supposed to appear, which could lead to incorrect matching with Azure AD.

 

 

Let me know if this helped!

 

Regards,

Ricardo

View solution in original post

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (3,954)