Can we create a webhook for specific event type in Share Point?
Can we create a webhook for specific event type in Share Point? Notifications are sent to your application for the following asynchronous list item events in SharePoint: ItemAdded ItemUpdated ItemDeleted ItemCheckedOut ItemCheckedIn ItemUncheckedOut ItemAttachmentAdded ItemAttachmentDeleted ItemFileMoved ItemVersionDeleted ItemFileConverted
But, is it something I can do trigger only for ItemAdded, ItemUpdated and ItemDeleted?
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Hi, can you clarify a bit more on what you mean? Are you looking to support other events not listed above in your post? Such as synchronous events ending in '-ing' like 'itemAdding' ?
@bcameron1231 i want webhook to trigger only if the document gets added/update/deleted, i don't want to webhook to get trigger for itemcheckedout/checked-in. Do we have option to enable the list of event types allowed while creating the webhook? orelse isit something to find what kind of event type on the subscription end?
Unfortunately, I do not believe you can using the SharePoint WebHooks.
You'd need to use the GetChanges endpoint to figure out what the changes were.
Another option, would be to use Microsoft Graph API to get changes notifications. In the response from a webhook, it returns what the change type is (deleted,updated,etc...)
https://docs.microsoft.com/en-us/graph/api/resources/webhooks?view=graph-rest-1.0
Closing issue as "answered". If you encounter similar issue(s), please open up a NEW issue. Thank you.
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues