✨Get embed code for video in SharePoint or OneDrive


As of this morning October 3, 2022 we rolled out the ability to get an embed code for a video uploaded to SharePoint, OneDrive, Teams, or Yammer. GCC coming in soon.

Embed menu where you can configure embed settings and copy the embed codeEmbed menu where you can configure embed settings and copy the embed code


From the ODB or SPO document library preview player: ... on action bar > Embed

Screenshot of ... menu in ODB and SPO preview player showing menu item to get embed code for a videoScreenshot of ... menu in ODB and SPO preview player showing menu item to get embed code for a video


From the Stream web app player page: Share > Embed code

Screenshot of Share menu in Stream web app player showing menu item to get embed code for a videoScreenshot of Share menu in Stream web app player showing menu item to get embed code for a video


Just make config changes to how you want the embed code to work, copy the iFrame embed code, and paste it on to your internal web page.





9 Replies
This is a Bidenesque BFD! Please do a Message Center post as this has been a feature many IT Admins have been waiting for.
I could not fully understand the embed access permissions. The statement (can't remember the source) is embedded video access permissions is determined by actual video file permissions on SP or OD. However "anyone with the link can view" (aka anyone links or anonymous access) permission is not respected by Stream embed feature...

It looks like this feature is not well-designed/thought...

Well, testing further I realize that anonymous access embed code works with default SharePoint Online configuration. However I still stand behind my argument this feature not being well-thought; when compliant device access SP setting turned on, viewing the embed webpart (configured with anonymous embed link) fails on all unmanaged devices while browsing the site. All SP site content is displayed except the anonymous stream video iframe...

Share links (Everyone in my organization or Anyone with the link) are different permissions than direct access permissions. The way embed codes in ODB/SPO for any file type (word, ppt, excel for the last several years) and now video files is the same, they work on "Direct access". Meaning the permission to the file or video needs to be applied without using a "Share link". So if you want everyone in your company to have view access you'd assign direct access to "Everyone Except External Users".

Unfortunately, there isn't a way to have public anonymous embed codes for any file in ODSP including videos today. This is something we are investigating for 2023.

I agree with you that the permissions in ODB/SPO are confusing and that the concepts of "Direct Access" and "Share Links" are hard for everyone to understand. We decided to start with video embed codes acting like all other file embed codes based on "Direct access" permissions.

I would encourage you to vote on or add new ideas to the ideas forum for public anonymous embed codes and/or for "anyone in the organization" embed codes that act more like share links do: https://aka.ms/StreamIdeas

@Marc Mroz 

Thank yo for your active role in the tech community and sharing valuable information to us!


I would like to comment the need for the public embedding feature.


Just as background information - I work for a vocational college with roughly 400+ staff and 10000 students ranging from 16-60 years of age and 20 different vocational branches. We also have many different ways of studying (classroom, online, hybrid, apprenticeship...). We have M365 package for everyone. Intranet is based on Sharepoint, public website on Wordpress, LMS on Moodle. In addition we use many different formats / platforms (for example H5P, ThingLink...) with our study materials, marketing, communication and so on.


Couple of principles we are trying to go by.

  • No OneDrive for materials (Video or otherwise) because of the risk of all the links and embeddings dying when the person leaves the organization.
  • instead we use Teams / SharePoint sites for storeing materials and then (with proper rights - usually "everyone with a link") share links and/or embed materials from there into other platforms.


The problem is that links work but embedding does not. So there is no logical reason for embedding not working. There is no information security / data protection reason because that would cause also the linking to not work. There seems to be some rather silly technical limitation in the embedding feature that prevents embedding with "everyone with a link" / "public" kind of user right.


Every video platform (and other cloud material platform) has this feature and I'm in slight disbelief that Stream (and SharePoint in general) seems to be missing this core functionality. I would argue that most M365 customers would welcome this because they do not want to be paying and using several video platforms for different use cases.


@Marc Mroz 
Is there any way to hide the video control? 

@T-Eskola - Sorry for my super late reply.  Yeah I hear you, but we don't have the capability to have public embed codes today, sorry. We know the desire is there but we aren't working on it right now. Please continue to vote on the ideas forum and add your comments there. This idea could use more votes: Allow everyone in my organization to view an embed · Community (microsoft.com)

@Khaledalbowaidani Can you explain more what you mean by hiding video control on embed? 

@Marc Mroz 


is it correct that we cannot use the embedded option with a "anyone within my organization" authorization. Full public / external access is not required. But for everyone in the company is what we want.

If this is not possible, what would be possible workarounds with sharepoint/teams setting.


In our current setup, videos are stores in a teams channel / it's "native" sharepoint representation. These videos should be embedded visible for all employees.