How to get a "link to this slide" for any slide of a PowerPoint presentation through Microsoft Graph API ?

Hadi Mahihenni 5 Reputation points
2024-11-08T08:52:34.84+00:00

Context

In PowerPoint (Office 365), you can generate a shareable "link to this slide" for any specific slide of a presentation. When pasted in a new browser tab for example, this links re-opens the presentation at the exact same slide.

If unclear, I am referring to the feature described here: https://www.youtube.com/watch?v=XDtpmKxVLLY


My specific issue

I am trying to get (or generate) this link via Microsoft Graph API for a PowerPoint presentation that lives on a SharePoint site, and I have failed so far. I now wonder if this is actually supported by the Graph API.

What I have managed to do so far:

  1. get a link to the presentation with

GET /sites/{site-id}/drive/items/{item-id}/webUrl

-> the drawback is it opens the presentation on the 1st slide each time, I didn't find any way to have the request generate a link for a specific slide.

  1. similar with

POST /sites/{site-id}/drive/items/{item-id}/createLink
Request body {"page": "3"}

which generates a link to the presentation 1st slide, not the 3rd one (maybe I am using a wrong argument name ?)

  1. generate a link to the preview of any specific slide with

POST /sites/{site-id}/drive/items/{item-id}/preview
Request body {"page": "3"}

-> the drawback is this is a link to a "preview" of the 3rd slide here, so it does not correspond to my need which is to open the specific slide in PowerPoint 365.

Question: Could you please confirm if what I am trying to achieve is supported by the Graph API or not ? If not, are you aware or can you think of a work-around ?
Thank you very much in advance.


Some additional details just in case

  • My web app is accessing SharePoint site via app-only access.
  • I do not have any trouble in authenticating into the SharePoint, accessing the presentation, downloading it etc. via GET/POST requests.
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,370 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.
311 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
4,022 questions
0 comments No comments
{count} vote

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.