Follow documents displayed using Highlighted content webpart

Mikello 81 Reputation points
2022-04-04T22:46:31.14+00:00

I have a business problem where site admins have setup Highlighted content webpart in various parts of the site to display documents based on a selected managed property (query rules in HCWebpart). So far so good. The reason for this is because doc libs have been setup with segregated permissions for a chunk of users who would be uploading/editing etc. but are looking to rollup docs from these libraries for another set of end users based on these highlighted content webparts for viewing purposes.

The issue is that site admins now want to provide a feature for these end users so they can "favorite" or "follow" a document from within these highlighted content webpart. I realize that this needs to be custom and I'm not a full developer. So far this is what I found: https://github.com/pnp/sp-dev-fx-extensions/tree/main/samples/react-command-follow-document
However this feature would only be available if each doc lib were exposed as a library webpart.

How can I modify the HCWebpart so that it exposes a similar functionality....or really any idea on how to tackle these two problems together? We still need the rollup of docs based on managed column + need to create a favorites feature

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,271 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,012 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,761 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,591 questions
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 32,556 Reputation points Microsoft Vendor
    2022-04-13T07:29:48.023+00:00

    Hi @Mikello ,
    Per my research, The github have updated the graph in the new version. The user need to have the read permission to the document at least. Here is the document about the graph.
    https://learn.microsoft.com/en-us/graph/api/drive-list-following?view=graph-rest-1.0&tabs=http
    You can use the 3.0 version of the follow document
    https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-follow-document


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.