I'm looking into options for retrieving thumbnails from SharePoint Online for an external .NET application using the SharePoint client object model (CSOM).

I've seen the following suggestion which apparently works for many files types (Word, Excel, PowerPoint, MP4), but I am experiencing many instances where it isn't working, even for images.


Could anyone explain why the above URL isn't working for various file types? Is it something to do with how the library has been setup? The content type?

Another option I've come across when browsing a SharePoint library and changing the view mode to Tiles is that the thumbnails come from another URL


I've not found any documentation for this URL. Has anyone come across this URL before? Is it possible to access from an external application?


2 Answers 2


The /_layouts/15/getpreview.ashx works in my test, check the screenshot below: enter image description here

The Url like this:


More information: https://blog.beecomedigital.com/2015/07/27/generate-thumbnail-of-a-document-stored-in-sharepoint-from-its-url/

  • That is the link I have been using but with inconsistent results. It doesn't always work for images and doesn't work for videos. Jan 3, 2018 at 10:18
  • Managed to get the it working for all image file types. Still no look with getting video thumbnails resulting in a 501 error. Feb 2, 2018 at 13:45
  • @SeanDooley did you found solution for video files?
    – Joao Paulo
    Sep 18, 2018 at 16:05
  • @JoaoPaulo I never found a solution for the video files. Sep 19, 2018 at 19:21

The following works for files stored in SharePoint Online document libraries using the Graph API to retrieve the thumbnail URLs:

  1. Open the Microsoft Graph Explorer site to check your REST call syntax.
  2. Call https://graph.microsoft.com/v1.0/sites/contoso.sharepoint.com:/sites/anothersitecollection:/drives to get the document libraries as drives and save the ID of the document library you need. Substitute your SharePoint tenant for "contoso" and your site collection URL component for "anothersitecollection".

  3. Call https://graph.microsoft.com/v1.0/drives/b!aXYZmss8ZEiVokyC-JytN274MKTABCdAqaqixLW2-0JqtL9COCftQr9Ct9neeDKJ/root/children to get the documents in the document library. Substitute your long drive ID for the example.

  4. Call https://graph.microsoft.com/v1.0/drives/b!aXYZmss8ZEiVokyC-JytN274MKTABCdAqaqixLW2-0JqtL9COCftQr9Ct9neeDKJ/items/01EQBDECC66F3P3O5YI5ABCIGG7O6M4Q23/thumbnails to get the thumbnail URLs. Substitute your long document ID for the example.

From my blog post: http://blog.larslynch.com/2019/01/3d-and-other-thumbnails-in-sharepoint.html

  • Thanks for the information @Lars. I will try and give that a go next week. Jan 11, 2019 at 22:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.