Add support in CSOM to modify the CustomScriptSafeDomains settings for a site
Support was added in March 2018 to read the CustomScriptSafeDomains settings for a site - we'd like the possibility to modify this setting through the CSOM API - not methods are currently available to modify this settings through code.

1 comment
-
Anonymous commented
This is already possible:
context.Site.CustomScriptSafeDomains.Create(new Microsoft.SharePoint.Client.ScriptSafeDomainEntityData { DomainName = "MyDomainName" });
This will overwrite or create a safe domain. Therefore there is no need to check if the setting exists.