Jan 10, 2019

3D and other thumbnails in SharePoint Online

Standard image and document thumbnails are easy to find in SharePoint Online but thumbnails for 3D files and other file formats are not so accessible as they are dynamically generated.


To get the thumbnail URL, we need to use the Graph API.
  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.

No comments:

Post a Comment