I have to create Embbeding url for one drive items

Vikram Singh 20 Reputation points
2024-06-13T12:49:03.7666667+00:00

I got this error:
{     "error": {         "code": "notSupported",         "message": "Requested sharingLink type is not yet available.",         "innerError": {             "date": "2024-06-13T12:35:11",             "request-id": "8e6fd769-c86b-43bc-bf95-1cfa0735f53a",             "client-request-id": "8e6fd769-c86b-43bc-bf95-1cfa0735f53a"         }     } }

Is their any other way to create embbeding urls.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,226 questions
OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
936 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Yakun Huang-MSFT 1,795 Reputation points Microsoft Vendor
    2024-06-14T08:27:07.7866667+00:00

    Hi @Vikram Singh

    According to the Graph API documentation, creating embedded URL is currently only supported in the personal version of OneDrive.

    User's image

    If you are using a work or school account, "type": "embed" is not supported and it will return this error message "notSupported".

    An implementable solution to this is to create a short-term embeddable URL that, when tested, works for work or school accounts.

    See the link for more information:

    https://video2.skills-academy.com/en-us/onedrive/developer/rest-api/api/driveitem_preview?view=odsp-graph-online

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.