New SharePoint CSOM version released for Office 365

We are happy to announce availability of new SharePoint CSOM package version for the Office 365. This release is done now using a NuGet package release. You can find the latest CSOM package for the cloud from the NuGet gallery with an id of ‘Microsoft.SharePointOnline.CSOM’. We will also update the redistributable package in upcoming weeks, but you can already right now get access on the updated CSOM for your solutions.

Notice that the version for these assemblies is 16.1.3912.1204, so that they do not overlap with the redistributable package, which will continue using 16.0.x.x style versioning. This way updated assemblies added to the NuGet packages will be used by your applications regardless if you had also installed the redistributable package. We are also planning push more frequent updates with the NuGet package in the future. When you use the NuGet package, you will always get the latest versions for you in your app. We have also included these assemblies to the assembly folder of Office 365 Developer Patterns and Practices, where you can always find latest CSOM assemblies for on-premises and cloud (currently in Dev branch and will be merged to master in May release).  We do however recommend using the nuget packages, rather than referencing these assemblies where possible.

Key updates with the assemblies

Here’s the key changes in the released assemblies. Main changes are related on level up with the on-premises CSOM which has been gradually updated during previous CUs.

  • Manage regional settings of a site
  • Manage language settings of a site
  • Manage auditing settings of a site
  • Control advance settings for document sets
  • Support for upcoming enhanced migration APIs
  • Control sandbox solution settings in site collection level
  • Secondary contact in site collection level
  • Sharing settings

We have not yet updated our Office 365 Developer Patterns and Practices samples, but the API usage is demonstrated with the samples which were originally developed for on-premises. These will be updated with the latest cloud CSOM in upcoming days now that the updated CSOM assemblies are available for broader usage.

 

How to get started with the NuGet package?

Let’s do this step by step, so that there’s no doubts.

1. Start up Visual studio and Choose the project type you want to use. In below example we will use console application.

image

2. Right click project properties and choose Manage NuGet Packages…

image

3. Search for “SharePoint Online Client Side Object Model” or “Microsoft.SharePointOnline.CSOM”

  • Notice the Created by and version information for the package.

image

4. Click Install for the package so that it will be installed on the VS project.

  • You can alternatively open up NuGet Package Manager and execute following line: “Install-Package Microsoft.SharePointOnline.CSOM -Version 16.1.3912.1204

5. Verify that the references of the project has been changed

image

6. You are ready to get started with your code. Here’s just simple code snippet to get access to Office 365, which you could add to your console application to test that everything works accordingly. You will obviously have to change the connectivity details accordingly to align with your own tenant.

 static void Main(string[] args)
 {
  
     // Get access to source site
     using (var ctx = new ClientContext("https://contoso.sharepoint.com"))
     {
         //Provide count and pwd for connecting to the source
         var passWord = new SecureString();
         foreach (char c in "mysecretpwd".ToCharArray()) passWord.AppendChar(c);
         ctx.Credentials = new SharePointOnlineCredentials("admin@contoso.onmicrosoft.com", passWord);
  
         // Actual code for operations
         Web web = ctx.Web;
         ctx.Load(web);
         ctx.ExecuteQuery();
  
         Console.WriteLine(string.Format("Connected to site with title of {0}", web.Title));
         Console.ReadLine();
     }
 }

 

Full list of changes in this release

Here’s the full list of changes in different assemblies compared to the previously released CSOM version. We will release samples in the Office 365 Developer Patterns and Practices for these gradually and are absolutely also open for contributions from the field for samples, which demonstrate these new APIs.

Those members which have existed before, but have been now changed are marked with *-character. These are the regional settings related properties which now support also updating those properties in site. We also do absolutely understand that this is not the best method or format to share the latest changes and we are working internally for better process with future releases. We did not also want to delay release notes on this, since we know that many from community have been waiting for these new APIs.

Update on 28th of April 2015 – Some of the APIs are actually meant to be used only internally and we have now marked those which we know with Internal marker.

Microsoft.SharePoint.Client

Here’s list of properties and new classes from the Microsoft.SharePoint.Client assembly.

  • public property Microsoft.SharePoint.ApplicationPages. ClientPickerQuery.ClientPeoplePickerQueryParameters.AllowOnlyEmailAddresses
  • public method Microsoft.SharePoint.Client.AppCatalog.GetAppDetails()
  • public method Microsoft.SharePoint.Client.AppCatalog.GetAppInstance()
  • public method Microsoft.SharePoint.Client.AppCatalog.GetAppPermissionDescriptions()
  • public property Microsoft.SharePoint.Client.AppInstance.ProductId    

 

  • public class Microsoft.SharePoint.Client.Audit
  • public enum Microsoft.SharePoint.Client.AuditMaskType
  • public class Microsoft.SharePoint.Client.AuditPropertyNames    

 

  • public property Microsoft.SharePoint.Client.CreatablesInfo.CanCreateFolders
  • public property Microsoft.SharePoint.Client.CreatablesInfo.CanUploadFiles
  • public class Microsoft.SharePoint.Client.DlpPolicyTip   

 

  • public method Microsoft.SharePoint.Client.File.ExecuteCobaltRequest
  • public method Microsoft.SharePoint.Client.File.GetImagePreviewUrl
  • public property Microsoft.SharePoint.Client.Folder.Exists
  • public property Microsoft.SharePoint.Client.Folder.IsWOPIEnabled
  • public property Microsoft.SharePoint.Client.Folder.ProgID    

 

  • public class Microsoft.SharePoint.Client.IngestionTaskKey    

 

  • public property Microsoft.SharePoint.Client.List.CrawlNonDefaultViews
  • public method Microsoft.SharePoint.Client.List.CreateDocumentFromTemplateStream
  • public property Microsoft.SharePoint.Client.List.FileSavePostProcessingEnabled
  • public method Microsoft.SharePoint.Client.List.GetSpecialFolderUrl
  • public method Microsoft.SharePoint.Client.List.GetWebDavUrl
  • public property Microsoft.SharePoint.Client.List.MajorVersionLimit
  • public property Microsoft.SharePoint.Client.List.MajorWithMinorVersionsLimit
  • public property Microsoft.SharePoint.Client.List.ParserDisabled
  • public property Microsoft.SharePoint.Client.ListItem.Client_Title
  • public property Microsoft.SharePoint.Client.ListItem.GetDlpPolicyTip
  • public method Microsoft.SharePoint.Client.ListItem.OverridePolicyTip    

 

  • public property Microsoft.SharePoint.Client.MountedFolderInfo.HasEditPermission
  • public property Microsoft.SharePoint.Client.MountedFolderInfo.ItemId
  • public property Microsoft.SharePoint.Client.MountedFolderInfo.ListTemplateType
  • public property Microsoft.SharePoint.Client.MountedFolderInfo.ListViewUrl
  • public property Microsoft.SharePoint.Client.MountedFolderInfo.WebUrl
  • public class Microsoft.SharePoint.Client.MoveCopyUtil  

 

  • public property Microsoft.SharePoint.Client.ObjectSharingInformation.CanBeShared
  • public property Microsoft.SharePoint.Client.ObjectSharingInformation.CanBeUnshared
  • public method Microsoft.SharePoint.Client. ObjectSharingInformation.CanCurrentUserShareRemote
  • public method Microsoft.SharePoint.Client. ObjectSharingInformation.GetObjectSharingInformationByUrl
  • public property Microsoft.SharePoint.Client. ObjectSharingInformation.SharedWithUsersCollection
  • public property Microsoft.SharePoint.Client. ObjectSharingInformationUser.IsDomainGroup
  • public class Microsoft.SharePoint.Client.ObjectSharingInformationUserCollection
  • public class Microsoft.SharePoint.Client.ObjectSharingSettings
  • public class Microsoft.SharePoint.Client.PickerSettings 

 

  • public property Microsoft.SharePoint.Client.RegionalSettings.AdjustHijriDays *
  • public property Microsoft.SharePoint.Client.RegionalSettings.AlternateCalendarType *
  • public property Microsoft.SharePoint.Client.RegionalSettings.CalendarType *
  • public property Microsoft.SharePoint.Client.RegionalSettings.CalendarType *
  • public property Microsoft.SharePoint.Client.RegionalSettings.Collation *
  • public property Microsoft.SharePoint.Client.RegionalSettings.FirstDayOfWeek *
  • public property Microsoft.SharePoint.Client.RegionalSettings.FirstWeekOfYear *
  • public property Microsoft.SharePoint.Client.RegionalSettings.LocaleId *
  • public property Microsoft.SharePoint.Client.RegionalSettings.ShowWeeks *
  • public property Microsoft.SharePoint.Client.RegionalSettings.Time24 *
  • public property Microsoft.SharePoint.Client.RegionalSettings.TimeZone *
  • public property Microsoft.SharePoint.Client.RegionalSettings.WorkDayEndHour *
  • public property Microsoft.SharePoint.Client.RegionalSettings.WorkDays *
  • public property Microsoft.SharePoint.Client.RegionalSettings.WorkDayStartHour *
  • public method Microsoft.SharePoint.Client.RegionalSettings.GetGlobalTimeZones *
  • public method Microsoft.SharePoint.Client.RegionalSettings.Update *    

 

  • public property Microsoft.SharePoint.Client.RemoteWeb.CanSendEmail
  • public method Microsoft.SharePoint.Client.RemoteWeb.GetFolderByServerRelativeUrl
  • public method Microsoft.SharePoint.Client.RemoteWeb.GetGroupById
  • public method Microsoft.SharePoint.Client.RemoteWeb.GetListByServerRelativeUrl
  • public property Microsoft.SharePoint.Client.RemoteWeb.ShareByEmailEnabled
  • public property Microsoft.SharePoint.Client.RemoteWeb.ShareByLinkEnabled

 

  • public method Microsoft.SharePoint.Client.RequestContext.GetRemoteContext
  • public property Microsoft.SharePoint.Client.RequestContext.List
  • public class Microsoft.SharePoint.Client.SharePointSharingSettings
  • public class Microsoft.SharePoint.Client.SharingResult
  • public class Microsoft.SharePoint.Client.SharingUserCollection    

 

  • public property Microsoft.SharePoint.Client.Site.Audit
  • public property Microsoft.SharePoint.Client.Site.AuditLogTrimmingRetention
  • public method Microsoft.SharePoint.Client.Site.CreateMigrationIngestionJob
  • public method Microsoft.SharePoint.Client.Site.CreateMigrationJob
  • public method Microsoft.SharePoint.Client.Site.DeleteMigrationJob
  • public method Microsoft.SharePoint.Client.Site.GetMigrationJobStatus
  • public property Microsoft.SharePoint.Client.Site.SandboxedCodeActivationCapability
  • public property Microsoft.SharePoint.Client.Site.SecondaryContact
  • public property Microsoft.SharePoint.Client.Site.TrimAuditLog    

 

  • public class Microsoft.SharePoint.Client.SPInvitationCreationResult
  • public class Microsoft.SharePoint.Client.TenantAppInstance
  • public method Microsoft.SharePoint.Client.TenantAppUtility.GetAppDetails
  • public method Microsoft.SharePoint.Client.TenantAppUtility.GetAppPermissionDescriptions
  • public method Microsoft.SharePoint.Client.TenantAppUtility.GetTenantAppInstance

 

  • public method Microsoft.SharePoint.Client.Web.AddSupportedUILanguage
  • public method Microsoft.SharePoint.Client.Web.CreateAnonymousLink
  • public method Microsoft.SharePoint.Client.Web.CreateAnonymousLinkWithExpiration
  • public method Microsoft.SharePoint.Client.Web.DeleteAllAnonymousLinksForObject
  • public method Microsoft.SharePoint.Client.Web.DeleteAnonymousLinkForObject
  • public method Microsoft.SharePoint.Client.Web.ForwardObjectLink
  • public method Microsoft.SharePoint.Client.Web.GetFileByLinkingUrl
  • public method Microsoft.SharePoint.Client.Web.GetObjectSharingSettings
  • public method Microsoft.SharePoint.Client.Web.IncrementSiteClientTag
  • public property Microsoft.SharePoint.Client.Web.IsMultilingual
  • public property Microsoft.SharePoint.Client.Web.OverwriteTranslationsOnChange
  • public method Microsoft.SharePoint.Client.Web.RemoveSupportedUILanguage
  • public method Microsoft.SharePoint.Client.Web.ShareObject
  • public property Microsoft.SharePoint.Client.Web.ThirdPartyMdmEnabled
  • public method Microsoft.SharePoint.Client.Web.UnshareObject

 

  • public property Microsoft.SharePoint.Client.Sharing.UserSharingResult.DisplayName
  • public property Microsoft.SharePoint.Client.Sharing.UserSharingResult.Email

 

  • public class Microsoft.SharePoint.Packaging.AppDetails
  • public class Microsoft.SharePoint.WebControls.ModuleLink
  • public class Microsoft.SharePoint.WebControls.ResourceManifestInformation

 

Microsoft.SharePoint.Client.Publishing

Here’s list of properties and new classes from the Microsoft.SharePoint.Client.Publishing assembly.

  • public property Microsoft.SharePoint.Client.Publishing. ImageRendition.Group

 

  • public property Microsoft.SharePoint.Client.Publishing. SpotlightChannel.TileHtmlColor
  • public property Microsoft.SharePoint.Client.Publishing. SpotlightChannel.Title
  • public property Microsoft.SharePoint.Client.Publishing. SpotlightChannel.VideoLibraryServerRelativeUrl       
  • public property Microsoft.SharePoint.Client.Publishing. SpotlightVideo.Url

 

  • public property Microsoft.SharePoint.Client.Publishing. VideoItem.OwnerName
  • public property Microsoft.SharePoint.Client.Publishing. VideoItem.PlayerPageUrl
  • public property Microsoft.SharePoint.Client.Publishing. VideoItem.Url

 

Microsoft.SharePoint.Client.Search

Here’s list of properties and new classes from the Microsoft.SharePoint.Client.Search assembly.

  • public class Microsoft.Office.Server.Search. Encryption.CertificateService - Internal       
  • public class Microsoft.SharePoint.Client.Search. Administration.PushTenantServiceInfo - Internal
  • public class Microsoft.SharePoint.Client.Search. AzureBroker.PushTenantManager - Internal
  • public class Microsoft.SharePoint.Client.Search. ContentPush.CertificateService - Internal
  • public class Microsoft.SharePoint.Client.Search. ContentPush.PushTenantManager - Internal
  • public class Microsoft.SharePoint.Client.Search. ContentPush.PushTenantServiceInfo - Internal
  • public property Microsoft.SharePoint.Client.Search. Query.KeywordQuery.TimeZoneId

 

Microsoft.SharePoint.Client.UserProfiles

Here’s list of properties and new classes from the Microsoft.SharePoint.Client.UserProfiles assembly.

  • public property Microsoft.SharePoint.Client.UserProfiles. FollowedItem.IsHybrid
  • public method Microsoft.SharePoint.Client.UserProfiles. UserProfile.CreatePersonalSiteSyncFromWorkItem

 

Microsoft.SharePoint.Client.DocumentManagement

Here’s list of properties and new classes from the Microsoft.SharePoint.Client.DocumentManagement assembly.

  • public class Microsoft.SharePoint.Client.DocumentSet.AllowedContentTypeCollection
  • public class Microsoft.SharePoint.Client.DocumentSet.DefaultDocument
  • public class Microsoft.SharePoint.Client.DocumentSet.DefaultDocumentCollection
  • public class Microsoft.SharePoint.Client.DocumentSet.DefaultDocumentPropertyNames
  • public class Microsoft.SharePoint.Client.DocumentSet.DocumentSetTemplate
  • public class Microsoft.SharePoint.Client.DocumentSet.DocumentSetTemplateObjectPropertyNames
  • public class Microsoft.SharePoint.Client.DocumentSet.SharedFieldCollection
  • public class Microsoft.SharePoint.Client.DocumentSet.WelcomePageFieldCollection

 

Microsoft.SharePoint.Client.Tenant

Here’s list of properties and new classes from the Microsoft.SharePoint.Client.Tenant assembly.

  • public class Microsoft.Online.SharePoint.SPLogger.LogExport – Internal
  • public class Microsoft.Online.SharePoint.SPLogger.LogFileInfo – Internal
  • public enum Microsoft.Online.SharePoint.TenantAdministration. SandboxedCodeActivationCapabilities
  • public property Microsoft.Online.SharePoint.TenantAdministration. SiteProperties.SandboxedCodeActivationCapability
  • public property Microsoft.Online.SharePoint.TenantAdministration. Tenant.AllowedDomainListForSyncClient
  • public property Microsoft.Online.SharePoint.TenantAdministration. Tenant.IsUnmanagedSyncClientForTenantRestricted
  • public property Microsoft.Online.SharePoint.TenantAdministration. Tenant.IsUnmanagedSyncClientRestrictionFlightEnabled
  • public property Microsoft.Online.SharePoint.TenantAdministration. Tenant.ShowAllUsersClaim
  • public property Microsoft.Online.SharePoint.TenantAdministration. Tenant.ShowEveryoneClaim
  • public property Microsoft.Online.SharePoint.TenantManagement. Office365Tenant.AllowedDomainListForSyncClient
  • public property Microsoft.Online.SharePoint.TenantManagement. Office365Tenant.IsUnmanagedSyncClientForTenantRestricted
  • public property Microsoft.Online.SharePoint.TenantManagement. Office365Tenant.IsUnmanagedSyncClientRestrictionFlightEnabled
  • public property Microsoft.Online.SharePoint.TenantManagement. Office365Tenant.ShowAllUsersClaim
  • public property Microsoft.Online.SharePoint.TenantManagement. Office365Tenant.ShowEveryoneClaim

 

You need additional APIs in CSOM?

imageIf you have any specific needs for the APIs you need, please let us know using User Voice in below address. We will address these requests and feedback where we can.

Please be patience on the requests, we will address those APIs which we can as fast as possible, but we do not have infinite resources, so we cannot provide any schedules related on the timing for addressing the feedback. Your input will be still highly appreciated and highly valuable for us to align the resources on the most needed capabilities.

 

Office 365 Developer Patterns and Practices

Office365PnPLogoRed_thumb1We will provide updated samples and scenarios based on these APIs in the Office 365 Developer Patterns and Practices guidance, which contains already more than 100 samples and solutions demonstrating different patterns and practices related on the app model development together with additional documentation related on the app model techniques.

Check the latest updates in our program from https://aka.ms/OfficeDevPnP. Please join us on sharing patterns and practices for the community for the benefit of the community.

“From the community for the community” – “Sharing is caring”