Using the .NET csom I am trying to retrieve the File that I just uploaded to sharepoint in order to check it in.

Here is the code I am using to upload the file to sharepoint

using (var stream = new MemoryStream(excel_file))

I can see the file in the document library just fine when I view the sharepoint site in a browser. The file is checked out so I need to also check it in at this time.

I am using this code to try to get the File object so that I can check it in

var file = web.GetFileByServerRelativeUrl(relative_url);

However an exception is thrown when it reaches the context.ExecuteQuery(); line with the error: "Field or property \"EffectiveInformationRightsManagementSettings\" does not exist.

What I have tried to resolve the issue:

  • Changing the context.Load(file) statement to context.Load(file, f => f.EffectiveInformationRightsManagementSettings);

1 Answer 1


The error occurs because the CSOM SDK that is being used is not compatible with the SharePoint server version. In this exact case I was using SDK version 16 when I should have been using version 15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.