Share via

Graph createLink method not returning any url when type is embed

Daniel Sousa | Flexmeester 1 Reputation point
2022-02-18T16:17:20.03+00:00

Hey there,

I've been trying to use graph.microsoft.com/v1.0 to retrieve an iframe HTML in order to be able to embed a Word document in edit mode on a web app. But so far all I get is this error:

{
"error": {
"code": "notSupported",
"message": "Requested sharingLink type is not yet available.",
"innerError": {
"date": "2022-02-18T15:48:38",
"request-id": "ad9ac825-42b6-429c-89b0-8ec623f918b7",
"client-request-id": "ad9ac825-42b6-429c-89b0-8ec623f918b7"
}
}
}

Strange part is that I can get a valid link when using type "edit" or "view".

I'm doing a Post request to the URL:
https://graph.microsoft.com/v1.0/drives/{DRIVEID}/items/{ITEMID}/createlink

and using the JSON body:
{
"type": "embed"
}

Any help? Cheers,
Daniel

Microsoft Security | Microsoft Graph
0 comments No comments

1 answer

Sort by: Most helpful
  1. Srinivasa Rao Darna 6,851 Reputation points Microsoft External Staff
    2022-02-18T17:45:46.417+00:00

    Hi @Daniel Sousa | Flexmeester ,

    As per documentation driveitem-createlink, it is currently supported for OneDrive Personal only.

    Clip from the documentation:
    175923-createlink-embed.jpg

    When you attempt createLink for OneDrive for Business or SharePoint Online, it will return this error message "notSupported".

    Hope this helps.
    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Was this answer helpful?


Your answer

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