Forum Discussion
How to enrich a result source with a managed property?
- Jan 22, 2019I don´t know any other way. Well, to be honest, you could develop a webjob/Azure function that once a day get all your user profiles, read the Manager property, and then update a custom UP property with the Full Name (then you mapped your search to this property). Obviously is much work.
The JavaScript path is not an easy one either, as you have to do an async call to the user profile REST API to get the Full name, and that´s not easy inside display templates. At the end of this post, a guy is sharing a piece of code that he says is doing the work, and renders a Lync presence card…
https://social.technet.microsoft.com/Forums/office/en-US/9ce7803b-d5ec-4374-a364-2e917c44acdd/display-the-managers-name-in-people-search-results-using-display-templates?forum=sharepointgeneral
Thanks! The reason why I have been hesitant to go the user profile property route is that the property actually already exists but in the wrong display name format.
It's actually "People:Manager" user profile property. Unfortunately, when mapping this to a manged property and using it as a refiner, the refiner display name will look like: "i:0#.f|membership|firstname.lastname@contoso.com".
Since I was unable to adapt the refiner display template (lack of Javascript skills) to change the display name to "Firstname Lastname", I thought of this workaround. That's why I created a list of all managers trying to enrich the Local People Results content source with it in order to avoid having to create a duplicate user profile property.
I guess I'll have to try the display template route again or do you know of another way?
The JavaScript path is not an easy one either, as you have to do an async call to the user profile REST API to get the Full name, and that´s not easy inside display templates. At the end of this post, a guy is sharing a piece of code that he says is doing the work, and renders a Lync presence card…
https://social.technet.microsoft.com/Forums/office/en-US/9ce7803b-d5ec-4374-a364-2e917c44acdd/display-the-managers-name-in-people-search-results-using-display-templates?forum=sharepointgeneral