microsoft-search / pnp-modern-search

Home of PnP Modern Search solutions, helping you move from classic to modern SharePoint and beyond
https://microsoft-search.github.io/pnp-modern-search
Other
376 stars 328 forks source link

The 'Show persona card on hover' does not work in the Teams-app #3278

Closed ivy86 closed 3 months ago

ivy86 commented 9 months ago

Version used 4.9.3

Describe the bug With the PnP Search Results webpart I created a people search within a modern communication site. I use the People layout to format the results. To make the search results more useful, I use the 'Show persona card on hover' option. This works fine in a browser. However, in the Teams-desktop app and Teams-mobile app results are not shown properly.

To Reproduce

  1. Create a new SharePoint-page in a modern communication site using a browser.
  2. Add the PnP - Search Results webpart
  3. Configure it with the following settings:
    • Use SharePoint search as data source
    • Select LocalPeopleResults as result source
    • Select the People layout
    • Activate 'Show persona card on hover'
    • Activate Use input query text with Static value and use as search query: * .
    • Publish the page.
  4. Observe that it works fine in the browser (see screenshot)
  5. Make sure that the page is accessible via the TEams-app. I accessed it via a Viva Connections-site so you can browse to it. For example, add a link to it on the Viva Connections start page.
  6. Access the page using the Teams-desktop-application
  7. Observe that no useful information is shown.

Expected behavior I expect the same functionality as shown in the browser. At the very least, it should not cause the results to break completely.

Screenshots search results in browser search results in teams-app

Desktop (please complete the following information):

Additional context Without the 'Show persona card on hover' the page works just fine in the Teams-app.

Thank you!

Edit: removed the references to Viva Connections. I can reproduce the issue on a regular SharePoint modern communication-site as well.

wobba commented 9 months ago

@ivy86 can you try this pre-release of the next version and see if works? https://t.co/iuGH02Kc1v

It has an updated Graph Toolkit verison which may solve it.

ivy86 commented 9 months ago

@ivy86 can you try this pre-release of the next version and see if works? https://t.co/iuGH02Kc1v

It has an updated Graph Toolkit verison which may solve it. Thank you. I will do so and get back to you this week.

ivy86 commented 9 months ago

@wobba Thank you for the pre-release. To conform, this is version 4.10.0.0. However, there is no difference. Still no visible results in de Teams app (both Teams-app for the desktop and Teams-app for mobile).

wobba commented 8 months ago

@ivy86 thanks for testing, and I'll see if I have time to investigate this issue.

kasperbolarsen commented 8 months ago

I'll look into this issue this week or next. @ivy86 any updates in your end?

kasperbolarsen commented 8 months ago

Hi @ivy86 Could you verify that the hover works fine if you add the search page as a tab in a Teams team? I have tested it in my end, and it works fine using a "Website", "SharePoint" and "SharePoint Pages" app.

It might be the Vivi part that is causing the error

ivy86 commented 8 months ago

Hello @kasperbolarsen , thanks for checking! Yes, I do have an update. It is an issue related to our tenant on not an issue with PnP Search in general: on my development tenant I do not have any problems when I implement the search functionality in exactly the same way. Furthermore, the issues does not seems to be related to Viva Connections. The issue occurs as well on a regular site within our tenant.

I have checked the graph permissions. Those were fine and I expected as much, since it works fine in the browser, just not in the apps.

kasperbolarsen commented 8 months ago

If you can isolate the issue, I think that a Microsoft support ticket might bring some insights, perhaps 🤔

Winslow-AT commented 7 months ago

Hey @ivy86, we're having the same problem in our tenant. Any information you get from MS about the issue or possible fix would be very much appreciated.

Thanks

ivy86 commented 7 months ago

Hello @kasperbolarsen , I see I've neglected to fully respond to your previous comment. Yes, including it via a tab in a channel, does not make a difference. I do not have any development skills, so I am not able to use the persona hover card without the use of PNP. I do not think Microsoft will assist in this matter because it is related to a PNP-solution.

The past weeks I've tried the following things:

If someone has any thoughts about including the persona card without using PNP-search webpart, that would be great. Because then I know if it is related to the PNP-search results webpart or the actual hover card itself.

@Winslow-AT No results yet. I am now attempting to modify the SharePoint Online Extensibility App reg to fix an additional error I get in the new teams client, but I do not have much hope, because with the same app reg configuration in my dev-tenant, it does work.

ivy86 commented 7 months ago

@Winslow-AT Have you made any progress? We had an issue with the new Teams client and PNP Search. It resulted in the error CAA20004 AADSTS650057 Invalid resource. The client has requested access to a resource which is not listed in the requested permissions in the client's application registration.

I have fixed this by changing the API Permissions the SharEPoint Online Client Extensibility Web Application Principal. Go to the App registration in Azure Portal and look for SharePoint Online Client Extensibility Web Application Principal. Open it and go to Manage - API Permisions. Here you see an overview of the API Permissions. You may see the permissions Contacts.Read, People.Reaad, User.Read and User.Read.all under 'Other permissions granted for '. Above you see a sectin called Configured permissions. Add Contacts.Read, People.Read, User.Read and User.Read.all there as delegated permissions. This fixes the error in the new client but the search results are still shown incorrectly in the Teams app.

wobba commented 7 months ago

I'm thinking when in Teams, maybe using this from beta is a better approach: https://learn.microsoft.com/en-us/javascript/api/@microsoft/teams-js/profile?view=msteams-client-js-latest

Winslow-AT commented 7 months ago

@ivy86 no progress so far, we're not using hover cards till it's fixed and would only be using it on an intranet site, no teams client usage planned.

ivy86 commented 7 months ago

I'm thinking when in Teams, maybe using this from beta is a better approach: https://learn.microsoft.com/en-us/javascript/api/@microsoft/teams-js/profile?view=msteams-client-js-latest

Hi @wobba Does this involve changing the actual PNP-search webpart? Because that is beyond my skill level.

kasperbolarsen commented 3 months ago

Hi @ivy86 if the issue hasn't been resolve please sign up for a PnP Modern Search Office Hours at https://aka.ms/pnp/modernsearchofficehours . I have it working in the new Teams client and in the browser as well

wobba commented 3 months ago

Closing as it's solved in the latest release.