Hi @g h ,
SharePoint 2013 On-Premise CSOM Web object didn't support Alerts property.
Please use SharePoint Server Object Model below instead:
using (SPSite site=new SPSite("http://sp/sites/MyDev"))
{
SPWeb web = site.OpenWeb();
SPAlertCollection alerts = web.Alerts;
foreach (SPAlert alert in alerts)
{
alert.Status = SPAlertStatus.Off;
alert.Update();
web.Update();
}
}
Thanks
Best Regards
If an Answer is helpful, please click "Accept Answer" and upvote it.
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.