How do I retrieve the id's of pages in a powerpoint file via Microsoft Graph API

Ruhan Ponnada 0 Reputation points Microsoft Employee
2024-08-08T18:54:48.49+00:00

I'm using Graph Explorer to try and get thumbnails of each page in my powerpoint. I can get the first thumbnail of the default first page with my file id but I can't seem to find a way to get id's for the following pages. Copilot suggested using the slides parameter but it doesn't seem to be working. Currently I received my file id by using the 1st command and then I can get the thumbnail of that first initial page using the 2nd command with 0 as the index but if I replace the 0 with 1 it's a "no response" error.

1: https://graph.microsoft.com/v1.0/me/drive/root:/YourFolderName:/children
2: https://graph.microsoft.com/v1.0/me/drive/items/<item-id>/thumbnails/0
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,002 questions
PowerPoint
PowerPoint
A family of Microsoft presentation graphics products that offer tools for creating presentations and adding graphic effects like multimedia objects and special effects with text.
291 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Gary Clarke 0 Reputation points
    2024-08-08T23:06:17.67+00:00

    Certainly! Retrieving thumbnails for each page in a PowerPoint presentation using Microsoft Graph can be achieved. Let's break it down:

    1. Retrieve Thumbnails for a PowerPoint File:
      • You can use the Graph API to get thumbnails for each page in your PowerPoint file.
      • The endpoint to retrieve available thumbnails for an item (your PowerPoint file) is:
        
                GET /me/drive/items/{item-id}/thumbnails
        
        
      • Replace {item-id} with the actual ID of your PowerPoint file.
    2. Slides Parameter:
      • Unfortunately, the slides parameter is not directly supported for retrieving individual page thumbnails.
      • Instead, you'll need to retrieve the overall thumbnail for the entire PowerPoint file and then extract individual page thumbnails from it.
    3. Example Request:
      • To retrieve available thumbnails for your PowerPoint file, use the following request in Graph Explorer:
        
                GET /me/drive/items/{item-id}/thumbnails
        
        
      • This will return an array of available thumbnail sets for your PowerPoint file.

    Remember to replace {item-id} with the actual ID of your PowerPoint file.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.