0

I would like to use this https://docs.microsoft.com/en-us/graph/api/driveitem-createlink?view=graph-rest-1.0&tabs=http#creating-embeddable-links and display webHtml in my website. I'm trying create this link for sharepoint (SP Online) file. Unfortunately when I made a request I've got an error that this type of link is not existing. Does anyone can confirm that or know how to modify settings to make it work?

1
  • Not saying it's absolutely impossible, but looks like that scenario isn't supported. From the documentation linked in the original post: "Note: Embed links are only supported for OneDrive personal." So my guess is that it just isn't going to work when trying to pull content from SharePoint Online. Had the documentation said it was supported in OneDrive for Business, that would be a different story. Commented Oct 7, 2021 at 21:16

1 Answer 1

0
  1. Try enabling anonymous external sharing within your SharePoint Online tenant. (this may be risky since your users need to be trained as to its security implications.)

  2. Then create a link using the SharePoint UI - by right clicking the item (or left clicking the ellipses) and selecting ‘copy link

  • ensure that the proper scope ‘Anyone with the link’ or ‘Anonymous’ is selected (editable via the drop down directly beneath the link)
  1. Then append the following query string to the end of the generated URL from step 2: &env=Embedded

See this post

2
  • This solution didn't work for me, still cannot see a file in iframe Commented Oct 8, 2021 at 8:48
  • Then you may be out of luck as per @Todd Commented Oct 8, 2021 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.