Create Alert for updates on SharePoint Modern Site Page using ReST API or Graph API

Copper Contributor

Hello!

I am trying to create an alert (Out of the Box alert) on any change/updates for a SharePoint Page from Site Pages using Rest API but with no luck. Tried endpoint with a POST request with parameters

_api/web/Alerts/Add

{
'alertCreationInformation':{ 
	'__metadata':{'type': 'SP.Alert'},
	'AlertFrequency':0,
	'AlertTemplateName': 'SPAlertTemplateType.WebPageLibrary',
	'AlertType':1,
	'AlwaysNotify':false,
	'DeliveryChannels':1,
	'EventType':-1,
	'Filter': '',
	'ItemID':22,
	'Status': 0,
	'ListID':'{fcf33d65-fada-4842-8d58-7401e3563f7d}',
	'Title':'Page Alert from API', 
	'UserId':6
}
}

 

Have tried the property alertCreationInformation while posting the api

https://s-kainet.github.io/sp-rest-explorer/#/_api/web/Alerts/Add

https://s-kainet.github.io/sp-rest-explorer/#/entity/SP.AlertCreationInformation

 

Property alertCreationInformation does not have property to pass in the PageITEM id or URL, user data.

Able to get all the alerts the user subscribed by a GET call to _api/web/Alerts
Could you please help. I don't see any endpoint in graph either. Thanks in advance.

2 Replies

any guidance would be greatly appreciated?

Hi @ashiqf
I am stuck with same, did you get any solution for this?