recieving notifications on create, update and delete event in sharepoint

Tzippy Freedman 0 Reputation points
2023-05-18T12:11:48.7266667+00:00

I need to receive create, update, delete and share (when a file was shared with some user) change events on sharepoint list, I need to receive the notifications in code using dotnet core c#. I see the following in the documentation:

Drive root item and list change notifications support only the updated changeType. (https://learn.microsoft.com/en-us/graph/webhooks?tabs=http#supported-resources)

Do you recommend using graph api or the sharpoint event receiver for to achieve the required notifications?

Thanks.

Microsoft Graph Files API
Microsoft Graph Files API
A Microsoft API to create an app that connects with files across OneDrive, OneDrive for Business, and SharePoint document libraries.
348 questions
Microsoft Graph Site Lists API
Microsoft Graph Site Lists API
A Microsoft API that "supports access to SharePoint sites, lists, and drives; read-only support for site resources; read-write support for lists, listItems, and driveItems; and address resources by SharePoint ID, URL, or relative path.
326 questions
Microsoft Graph SDK
Microsoft Graph SDK
A Microsoft software developer kit designed to simplify building high-quality, efficient, and resilient applications that access Microsoft Graph.
879 questions
SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,501 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 19,726 Reputation points Microsoft Vendor
    2023-05-19T06:16:02.44+00:00

    Hi @Tzippy Freedman

    I will recommend you to use sharpoint event receiver. Graph notification requires additional development effort to set up and manage subscriptions for event notifications. And there may have limitations on the number of subscriptions or the frequency of notifications, depending on the service plan or permissions.

    Sharpoint Event Receiver provides a built-in mechanism within SharePoint to respond to specific events directly. It also offers granular control and flexibility to trigger actions based on events at the item, list, or site level.

    In summary, if you specifically want to respond to SharePoint events within the SharePoint environment, have granular control over event triggers, or are working with older SharePoint versions, SharePoint Event Receivers can be a suitable option.


    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.