Add ability to download old version of a file via API/CSOM
One should be able to download an older version of a file using something like:
FileInformation info = File.OpenBinaryDirect(context, "/" + _fileVersion.Url);
But instead that throws a 401 error.
Thanks for your feedback! We’re happy to report that your suggestion is now part of the September 2017 version of the CSOM NuGet package. You can find details and simple code sample from following blog post – https://dev.office.com/blogs/new-sharepoint-csom-version-released-for-Office-365-september-2017.
Technically file access has been available for a while with SharePoint Online CSOM, but with the latest updates, you can also access list item field version and we have included a code sample for the APIs in this blog post also around file version downloading.