Embedding a OneDrive for Business file anonymously

OneDrive for Business gives you the ability to share files with others quickly and easily. You can even share files with others so that anyone can view them without needing a login. This is known as anonymous sharing.


To share anonymously, firstly ensure that you have enabled your users to share OneDrive content with external users as shown above. You’ll find that setting at:


which you need to access as a global administrator.


Next, select the file you want to share in OneDrive and then select Copy link from the menu across the top. Set the desired permissions. I’d generally recommend you set these to read only.

Copy the link which should look like:



If you now plug that into another browser or an ‘in-private’ browser session the file contents should be display as shown above.

If the document doesn’t appear or you are prompted to login then you need to double check your document sharing.

However, let’s now say you want to embed this document into a public web page.


If you return to the source document in OneDrive for Business and view that document is a browser by clicking on it, the document should display. If you you select the three dots at the right a menu should appear as shown above. From that menu, select the Embed option


You should now see an embed dialog like that shown above. You will notice that the embed is also listed.


However, if you copy and paste that code you end up with a web page like that shown above that asks for a login.

From what I can determine the embed code provided is only for embedding inside something like a Team Site in Office 365. The embed code is not for use with anonymous external users. That is, it won’t work for public viewing on the Internet.

However, the native embed codes appears as:


If you replace:


with the actual sharing link you received originally, the embed code then looks like:


If you now use that edited embed code in a a public web page, that page should now appear with the embedded file item from OneDrive for Business like so:


So the trick when it comes to embedding anonymous document from OneDrive for Business is to change the embed code to include the URL of the external sharing link you received when you shared the file with everyone.

Not as nice as other applications can embed anonymous documents, but then really, Office 365 isn’t really aimed at sharing information anonymously now is it? I’m also pretty sure Microsoft have this anonymous embedding feature on the roadmap but my guess is that it doesn’t have a high priority at this stage.

I have embedded that file below to confirm that doing so anonymously is possible:


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s