New SharePoint CSOM version released for SharePoint Online - February 2017

We are happy to announce availability of new SharePoint Client Side Object Model (CSOM) version targeted for the Office 365 or more specifically for SharePoint and Project Online. This release again contains few updates on the existing SharePoint CSOM assemblies and some maintenance changes. Key changes in this release is the updates around the CSOM alert APIs.

You can find the latest CSOM package for SharePoint Online, including the Project Online CSOM assembly, from the NuGet gallery with an id of 'Microsoft.SharePointOnline.CSOM'. We are also working on updating the redistributable package at some point, but you can already right now start using some of these new capabilities in your solutions. We do recommend you to use the NuGet Package to gain access on latest version, rather than downloading the SDK to your machine.

Version of the newly released CSOM package is 16.1.6216.1200. Previous versions of the NuGet have not been removed, so that your existing solutions will continue working without issues and you can decide when the new version is taken into use. Notice that even though the Nuget version is increased to 16.1.6216.1200, actual assembly version of the released assemblies is 16.1.0.0. You can also check the version of the assemblies from the File Version attribute, which aligns with the NuGet version.

Screenshot of the CSOM NuGet package at Visual Studio Nuget Gallery view

SharePoint Online Management Shell will be also updated around the 1st of March to match on the CSOM version. We are also working on getting the MSDN reference API documentation updated with the latest release with additional documentation on new APIs, so that you can more easily see all the latest and supported APIs for SharePoint Online.

Notice that since this NuGet package is targeted to SharePoint Online, you cannot use it directly in on-premises environments (SharePoint 2013 or 2016). This is because of the server side dependencies of the APIs. CSOM versioning model and dependency to your target environment is clarified in following blog post - Using correct Client Side Object Model (CSOM) version for SharePoint customizations. We have released separate NuGet packages for on-premises. See following blog post for additional details - SharePoint CSOM versions for on-premises released as NuGet packages.

Creating Alerts using CSOM

We released original support for creating Alerts in the SharePoint Online with the January 2017 release of the CSOM, but unfortunately this release had a bug related on the defining the alert details and only way you could create them, was not optimal, like explained in Todd Baginski's blog post. Here's updated example on how to create Alerts using CSOM in SharePoint Online.


// Load needed information from SharePoint Online
User currentUser = ctx.Web.CurrentUser;
ctx.Load(currentUser);
ctx.Load(currentUser.Alerts);
ctx.Load(currentUser.Alerts,
lists => lists.Include(
list => list.Title,
list => list.ListID));

ctx.ExecuteQuery();

// Create new alert using CSOM for the user
AlertCreationInformation newAlert = new AlertCreationInformation();
newAlert.List = ctx.Web.Lists.GetByTitle("Documents");
newAlert.AlertFrequency = AlertFrequency.Daily;
newAlert.AlertTime = DateTime.Today.AddDays(1);
newAlert.AlertType = AlertType.List;
newAlert.AlwaysNotify = false;
newAlert.DeliveryChannels = AlertDeliveryChannel.Email;
newAlert.Status = AlertStatus.On;
newAlert.Title = "New alert created at : " + DateTime.Now.ToString();
newAlert.User = currentUser;
newAlert.EventType = AlertEventType.All;
newAlert.Filter = "0";
// 0 = Anything Changes
// 1 = Someone else changes a document
// 2 = Someone else changes a document created by me
// 3 = Someone else changes a document modified by me

// add the alert for the user
var newAlertGuid = currentUser.Alerts.Add(newAlert);
currentUser.Update();

//Execute creation request to the SPO
ctx.ExecuteQuery();

New properties and methods cross assemblies

Here's a raw list of all the changes in the classes, properties and methods within this package. 

Microsoft.SharePoint.Client

Following properties, classes and methods have been added.

  • public method Microsoft.SharePoint.Client.APIHubConnector.CreateListItem
  • public method Microsoft.SharePoint.Client.APIHubConnector.GetEntityValues
  • public method Microsoft.SharePoint.Client.APIHubConnector.GetListItem
  • public method Microsoft.SharePoint.Client.APIHubConnector.GetListItems
  • public method Microsoft.SharePoint.Client.APIHubConnector.GetNewListItems
  • public method Microsoft.SharePoint.Client.APIHubConnector.GetUpdatedListItems
  • public method Microsoft.SharePoint.Client.APIHubConnector.UpdateListItem
  • public property Microsoft.SharePoint.Client.ConnectorResult.ContextData

  • public class Microsoft.SharePoint.Client.CustomerKeyInfo

  • public method Microsoft.SharePoint.Client.File.GetImagePreviewUri
  • public method Microsoft.SharePoint.Client.File.GetUploadStatus

  • public property Microsoft.SharePoint.Client.ListItem.ServerRedirectedEmbedUri
  • public method Microsoft.SharePoint.Client.ListItem.SetComplianceTagWithRecord

  • public class Microsoft.SharePoint.Client.MicroServiceManager
  • public class Microsoft.SharePoint.Client.MicroServiceUtilities

  • public class Microsoft.SharePoint.Client.MoveCopyOptions
  • public property Microsoft.SharePoint.Client.NavigationNode.ListTemplateType

  • public method Microsoft.SharePoint.Client.RemoteWeb.GetFileByServerRelativePath
  • public property Microsoft.SharePoint.Client.RenderListDataParameters.ReplaceGroup
  • public enum Microsoft.SharePoint.Client.RequestType

  • public method Microsoft.SharePoint.Client.Site.OnboardTenantForBringYourOwnKey

  • public property Microsoft.SharePoint.Client.Web.DesignPackageId
  • public method Microsoft.SharePoint.Client.Web.GetViewFromPath

  • public class Microsoft.SharePoint.Client.Utilities.UploadStatus

Following items have been REMOVED from this assembly

  • public property Microsoft.SharePoint.Client.AlertCreationInformation.Properties
    • Notice that this might impact your customizations, if you started using this Alert CSOM APIs from January 2017 release. This is a fix for the bug, which existed on the first release.
  • public property Microsoft.SharePoint.MicrosService.MicroServiceManager

Microsoft.Online.SharePoint.Client.Tenant

Following properties, classes and methods have been added.

  • public method Microsoft.Online.SharePoint.TenantAdministration.Tenant.GetTenantCdnRestrictedSiteClassifications
  • public property Microsoft.Online.SharePoint.TenantAdministration.Tenant.OwnerAnonymousNotification
  • public method Microsoft.Online.SharePoint.TenantAdministration.Tenant.SetTenantCdnRestrictedSiteClassifications

  • public method Microsoft.Online.SharePoint.TenantManagement.Office365Tenant.GetTenantCdnRestrictedSiteClassifications
  • public property Microsoft.Online.SharePoint.TenantManagement.Office365Tenant.OwnerAnonymousNotification
  • public method Microsoft.Online.SharePoint.TenantManagement.Office365Tenant.SetTenantCdnRestrictedSiteClassifications

Microsoft.Office.Client.Policy

Following properties, classes and methods have been added.

  • public property Microsoft.SharePoint.Client.CompliancePolicy.ComplianceTag.AutoDelete
  • public property Microsoft.SharePoint.Client.CompliancePolicy.ComplianceTag.BlockEdit
  • public property Microsoft.SharePoint.Client.CompliancePolicy.ComplianceTag.HasRetentionAction

  • public method Microsoft.SharePoint.Client.CompliancePolicy.SPPolicyStore.GetPolicyAssociations
  • public method Microsoft.SharePoint.Client.CompliancePolicy.SPPolicyStore.GetPolicyBindings
  • public method Microsoft.SharePoint.Client.CompliancePolicy.SPPolicyStore.GetPolicyRules

Microsoft.Office.Client.Publishing

Following properties, classes and methods have been added.

  • public class Microsoft.SharePoint.Client.Publishing.SitePageVersionInfo
  • public property Microsoft.SharePoint.Client.Publishing.TextValueWithLanguage.ColorSeed

Microsoft.Office.Client.Taxonomy

Following properties, classes and methods have been added.

  • public method Microsoft.SharePoint.Client.Taxonomy.TermStore.GetPackage
  • public method Microsoft.SharePoint.Client.Taxonomy.TermStore.GetPackagesUpdateInformation

“Sharing is caring”


Vesa Juvonen, Senior Program Manager, OneDrive-SharePoint Engineering, Microsoft - 24th of February 2017

Comments powered by Disqus