{"id":528,"date":"2017-02-24T00:00:00","date_gmt":"2017-02-24T00:00:00","guid":{"rendered":"http:\/\/officedevblogs.wpengine.com\/?p=528"},"modified":"2021-11-15T10:48:53","modified_gmt":"2021-11-15T18:48:53","slug":"new-sharepoint-csom-version-released-for-office-365-february-2017","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/new-sharepoint-csom-version-released-for-office-365-february-2017\/","title":{"rendered":"New SharePoint CSOM version released for SharePoint Online &#8211; February 2017"},"content":{"rendered":"<div id=\"body-content\">\n<p>We are happy to announce availability of new&nbsp;SharePoint Client Side Object Model (CSOM) version targeted for the Office 365 or more specifically for SharePoint and Project Online. This release again contains&nbsp;few updates on the existing SharePoint CSOM assemblies and some maintenance changes.&nbsp;Key changes in this release is the updates around the CSOM alert APIs.<\/p>\n<p>You can find the latest CSOM package for SharePoint Online, including the Project Online CSOM assembly, from the <a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.SharePointOnline.CSOM\">NuGet gallery<\/a> with an id of &#8216;<em>Microsoft.SharePointOnline.CSOM<\/em>&#8216;. 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&nbsp;the SDK to your machine.<\/p>\n<p>Version of the newly released CSOM package is <strong>16.1.6216.1200<\/strong>. Previous&nbsp;versions of the NuGet have&nbsp;<strong>not<\/strong> been removed, so that your existing solutions will continue working without issues and you can decide when the new version is taken into use.&nbsp;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 <em>File Version attribute<\/em>, which aligns with the NuGet version.<\/p>\n<p><img decoding=\"async\" class=\"img-responsive\" width=\"800\" height=\"485\" alt=\"Screenshot of the CSOM NuGet package at Visual Studio Nuget Gallery view\" src=\"https:\/\/officedevblogs.wpengine.com\/wp-content\/uploads\/2018\/05\/SPCSOMNuget16161121200-1.png\"><\/p>\n<p><a href=\"https:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=35588\">SharePoint Online Management Shell<\/a>&nbsp;will be also updated around the 1st of March to match on the CSOM version. We are also&nbsp;working on getting the <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/office\/jj193041.aspx\">MSDN reference API documentation<\/a>&nbsp;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.<\/p>\n<p><strong><em>Notice<\/em><\/strong>&nbsp;that since this NuGet&nbsp;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&nbsp;dependency to your target environment is clarified in following blog post &#8211; <a href=\"http:\/\/officedevblogs.wpengine.com\/using-correct-csom-version-for-sharepoint-customizations\">Using correct Client Side Object Model (CSOM) version for SharePoint customizations<\/a>.&nbsp;We have released separate NuGet packages for on-premises. See following blog post for additional details &#8211; <a href=\"https:\/\/officedevblogs.wpengine.com\/sharepoint-csom-versions-for-on-premises-released-as-nuget-packages\">SharePoint CSOM versions for on-premises released as NuGet packages<\/a>.<\/p>\n<h2>Creating Alerts using CSOM<\/h2>\n<p>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&nbsp;only way you could&nbsp;create them, was not optimal, like explained in <a href=\"http:\/\/toddbaginski.com\/blog\/how-to-create-office-365-sharepoint-alerts-with-the-client-side-object-model-csom\/\">Todd Baginski&#8217;s blog post<\/a>. Here&#8217;s updated example on how to create Alerts using CSOM in SharePoint Online.<\/p>\n<pre><br>   \/\/ Load needed information from SharePoint Online<br>   User currentUser = ctx.Web.CurrentUser;<br>   ctx.Load(currentUser);<br>   ctx.Load(currentUser.Alerts);<br>   ctx.Load(currentUser.Alerts,<br>       lists =&gt; lists.Include(<br>           list =&gt; list.Title,<br>               list =&gt; list.ListID));<br><br>   ctx.ExecuteQuery();<br><br>   \/\/ Create new alert using CSOM for the user<br>   AlertCreationInformation newAlert = new AlertCreationInformation();<br>   newAlert.List = ctx.Web.Lists.GetByTitle(\"Documents\");<br>   newAlert.AlertFrequency = AlertFrequency.Daily;<br>   newAlert.AlertTime = DateTime.Today.AddDays(1);<br>   newAlert.AlertType = AlertType.List;<br>   newAlert.AlwaysNotify = false;<br>   newAlert.DeliveryChannels = AlertDeliveryChannel.Email;<br>   newAlert.Status = AlertStatus.On;<br>   newAlert.Title = \"New alert created at : \" + DateTime.Now.ToString();<br>   newAlert.User = currentUser;<br>   newAlert.EventType = AlertEventType.All;<br>   newAlert.Filter = \"0\"; <br>   \/\/ 0 = Anything Changes<br>   \/\/ 1 = Someone else changes a document<br>   \/\/ 2 = Someone else changes a document created by me<br>   \/\/ 3 = Someone else changes a document modified by me<br><br>   \/\/ add the alert for the user<br>   var newAlertGuid = currentUser.Alerts.Add(newAlert);<br>   currentUser.Update();<br> <br>   \/\/Execute creation request to the SPO<br>   ctx.ExecuteQuery();<br><br><\/pre>\n<p><h2>New properties and methods cross assemblies<\/h2>\n<p>Here&#8217;s a raw list of all the changes in the classes,&nbsp;properties and methods within this package.&nbsp;<\/p>\n<h2>Microsoft.SharePoint.Client<\/h2>\n<p>Following properties, classes and methods have been <strong>added.<\/strong><\/p>\n<ul>\n<li>public <strong>method<\/strong> Microsoft.SharePoint.Client.APIHubConnector.CreateListItem<\/li>\n<li>public <strong>method<\/strong> Microsoft.SharePoint.Client.APIHubConnector.GetEntityValues<\/li>\n<li>public <strong>method<\/strong> Microsoft.SharePoint.Client.APIHubConnector.GetListItem<\/li>\n<li>public <strong>method<\/strong> Microsoft.SharePoint.Client.APIHubConnector.GetListItems<\/li>\n<li>public <strong>method<\/strong> Microsoft.SharePoint.Client.APIHubConnector.GetNewListItems<\/li>\n<li>public <strong>method<\/strong> Microsoft.SharePoint.Client.APIHubConnector.GetUpdatedListItems<\/li>\n<li>public <strong>method<\/strong> Microsoft.SharePoint.Client.APIHubConnector.UpdateListItem<\/li>\n<li>public <strong>property<\/strong> Microsoft.SharePoint.Client.ConnectorResult.ContextData\n<\/li>\n<li>public <strong>class<\/strong> Microsoft.SharePoint.Client.CustomerKeyInfo\n<\/li>\n<li>public <strong>method<\/strong> Microsoft.SharePoint.Client.File.GetImagePreviewUri<\/li>\n<li>public <strong>method<\/strong> Microsoft.SharePoint.Client.File.GetUploadStatus\n<\/li>\n<li>public <strong>property<\/strong> Microsoft.SharePoint.Client.ListItem.ServerRedirectedEmbedUri<\/li>\n<li>public <strong>method<\/strong> Microsoft.SharePoint.Client.ListItem.SetComplianceTagWithRecord\n<\/li>\n<li>public <strong>class<\/strong> Microsoft.SharePoint.Client.MicroServiceManager<\/li>\n<li>public <strong>class<\/strong> Microsoft.SharePoint.Client.MicroServiceUtilities\n<\/li>\n<li>public <strong>class<\/strong> Microsoft.SharePoint.Client.MoveCopyOptions<\/li>\n<li>public <strong>property<\/strong> Microsoft.SharePoint.Client.NavigationNode.ListTemplateType\n<\/li>\n<li>public <strong>method<\/strong> Microsoft.SharePoint.Client.RemoteWeb.GetFileByServerRelativePath<\/li>\n<li>public <strong>property<\/strong> Microsoft.SharePoint.Client.RenderListDataParameters.ReplaceGroup<\/li>\n<li>public <strong>enum<\/strong> Microsoft.SharePoint.Client.RequestType\n<\/li>\n<li>public <strong>method<\/strong> Microsoft.SharePoint.Client.Site.OnboardTenantForBringYourOwnKey\n<\/li>\n<li>public <strong>property<\/strong> Microsoft.SharePoint.Client.Web.DesignPackageId<\/li>\n<li>public <strong>method<\/strong> Microsoft.SharePoint.Client.Web.GetViewFromPath\n<\/li>\n<li>public <strong>class <\/strong>Microsoft.SharePoint.Client.Utilities.UploadStatus<\/li>\n<\/ul>\n<p>Following&nbsp;items have been <strong>REMOVED<\/strong> from this assembly<\/p>\n<ul>\n<li>public <strong>property<\/strong>&nbsp;Microsoft.SharePoint.Client.AlertCreationInformation.Properties  \n<ul>\n<li>Notice that this might impact your customizations, if you started using this Alert CSOM APIs from January 2017 release. This&nbsp;is a fix for the bug, which existed on the first release.<\/li>\n<\/ul>\n<\/li>\n<li>public <strong>property<\/strong> Microsoft.SharePoint.MicrosService.MicroServiceManager\n<\/li>\n<\/ul>\n<h2>Microsoft.Online.SharePoint.Client.Tenant<\/h2>\n<p>Following properties, classes and methods have been <strong>added.<\/strong><\/p>\n<ul>\n<li>public <strong>method<\/strong> Microsoft.Online.SharePoint.TenantAdministration.Tenant.GetTenantCdnRestrictedSiteClassifications<\/li>\n<li>public <strong>property<\/strong> Microsoft.Online.SharePoint.TenantAdministration.Tenant.OwnerAnonymousNotification<\/li>\n<li>public <strong>method<\/strong> Microsoft.Online.SharePoint.TenantAdministration.Tenant.SetTenantCdnRestrictedSiteClassifications\n<\/li>\n<li>public <strong>method<\/strong> Microsoft.Online.SharePoint.TenantManagement.Office365Tenant.GetTenantCdnRestrictedSiteClassifications<\/li>\n<li>public <strong>property<\/strong> Microsoft.Online.SharePoint.TenantManagement.Office365Tenant.OwnerAnonymousNotification<\/li>\n<li>public <strong>method<\/strong> Microsoft.Online.SharePoint.TenantManagement.Office365Tenant.SetTenantCdnRestrictedSiteClassifications\n<\/li>\n<\/ul>\n<h2>Microsoft.Office.Client.Policy<\/h2>\n<p>Following properties, classes and methods have been <strong>added.<\/strong><\/p>\n<ul>\n<li>public <strong>property<\/strong> Microsoft.SharePoint.Client.CompliancePolicy.ComplianceTag.AutoDelete<\/li>\n<li>public <strong>property<\/strong> Microsoft.SharePoint.Client.CompliancePolicy.ComplianceTag.BlockEdit<\/li>\n<li>public <strong>property<\/strong> Microsoft.SharePoint.Client.CompliancePolicy.ComplianceTag.HasRetentionAction\n<\/li>\n<li>public <strong>method<\/strong> Microsoft.SharePoint.Client.CompliancePolicy.SPPolicyStore.GetPolicyAssociations<\/li>\n<li>public <strong>method<\/strong> Microsoft.SharePoint.Client.CompliancePolicy.SPPolicyStore.GetPolicyBindings<\/li>\n<li>public <strong>method<\/strong> Microsoft.SharePoint.Client.CompliancePolicy.SPPolicyStore.GetPolicyRules\n<\/li>\n<\/ul>\n<h2>Microsoft.Office.Client.Publishing<\/h2>\n<p>Following properties, classes and methods have been <strong>added.<\/strong><\/p>\n<ul>\n<li>public <strong>class<\/strong> Microsoft.SharePoint.Client.Publishing.SitePageVersionInfo<\/li>\n<li>public <strong>property<\/strong> Microsoft.SharePoint.Client.Publishing.TextValueWithLanguage.ColorSeed\n<\/li>\n<\/ul>\n<h2>Microsoft.Office.Client.Taxonomy<\/h2>\n<p>Following properties, classes and methods have been <strong>added.<\/strong><\/p>\n<ul>\n<li>public <strong>method<\/strong> Microsoft.SharePoint.Client.Taxonomy.TermStore.GetPackage<\/li>\n<li>public <strong>method<\/strong> Microsoft.SharePoint.Client.Taxonomy.TermStore.GetPackagesUpdateInformation\n<\/li>\n<\/ul>\n<p><span style=\"font-size: large\"><em>&ldquo;Sharing is caring&rdquo;<\/em><\/span><\/p>\n<hr>\n<p><i><a href=\"https:\/\/twitter.com\/vesajuvonen\">Vesa Juvonen<\/a>, Senior Program Manager, OneDrive-SharePoint Engineering, Microsoft &#8211; 24th&nbsp;of February 2017<\/i><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We are happy to announce availability of new&nbsp;SharePoint Client Side Object Model (CSOM) version targeted for the Office 365 or more specifically for SharePoint and Project Online. This release<\/p>\n","protected":false},"author":69217,"featured_media":529,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[9],"tags":[],"class_list":["post-528","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sharepoint-framework"],"acf":[],"blog_post_summary":"<p>We are happy to announce availability of new&nbsp;SharePoint Client Side Object Model (CSOM) version targeted for the Office 365 or more specifically for SharePoint and Project Online. This release<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/528","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/users\/69217"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/comments?post=528"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/528\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media\/529"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media?parent=528"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/categories?post=528"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/tags?post=528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}