• Products
  • Documentation
  • Resources

Insert the Microsoft OneDrive for Business macro

The Microsoft OneDrive for Business macro will no longer be available in the legacy editor as of May 30, 2024.

However, you can continue to embed OneDrive documents into Confluence by:

  1. Converting legacy editor pages with OneDrive macros to the new editor. Those macros will be automatically converted into Smart Links with the same functionality. Once the OneDrive macro is deprecated, we’ll provide guidance about converting to the new editor wherever this macro is inserted in the legacy editor.

  2. Browsing the Marketplace for alternative solutions.

Find out more about the OneDrive macro deprecation

This macro is only available for the legacy editor. Learn more about editor versions.

As long as your administrator has installed the Microsoft OneDrive for Business (Beta) app, you can use the Microsoft OneDrive for Business macro.

This app only supports OneDrive for Business and SharePoint accounts. Personal OneDrive accounts won’t be able to connect.

Example of the OneDrive macro

With the Microsoft OneDrive for Business (Beta) app installed, you can embed Word, Excel, and PowerPoint files from your OneDrive for Business or SharePoint account directly into your Confluence page.

You can do this in three ways:

  1. Paste the link (the file’s URL or the file’s public URL) directly into the editor. Confluence will automatically convert that link into the macro.

  2. Click the Insert ( + ) icon in the editor’s toolbar and choose View more at the bottom of the dropdown list. When the macro browser modal appears, start typing “Microsoft OneDrive for Business” or just “OneDrive” in the search bar (top right). When you see it in the search results, click it and paste in your copied Word, Excel, or PowerPoint file URL (the file’s URL or the file’s public URL). Then click Insert.

  3. Type “/” into the editor to activate the macro shortcut, then start typing “Microsoft OneDrive for Business” or just “OneDrive” until you see it in the list that appears. After you click it, paste in your OneDrive or SharePoint document’s URL (the file’s URL or the file’s public URL) and click Insert.

Users need to be signed in to their Microsoft accounts to view any document in the macro.

The Microsoft OneDrive for Business (Beta) app only supports embedding Microsoft Word, Excel, and PowerPoint files. It doesn’t let you embed any other types of files you may have in OneDrive or SharePoint.

Parameters

Parameters are options that you can set to control the content or format of the macro output.

Parameter

Default

Description

Microsoft OneDrive URL

none

This is the URL of your OneDrive or SharePoint file. You can get this URL from the address bar in your browser or using the Get a link option in OneDrive or SharePoint.

Height

variable

Confluence defaults to Microsoft's preferred size for each file type (.docx, .xlsx, .ppt), but you can easily change this when you’re inserting the file.

Include a link to 'Open in new tab'

yes

Use this option to add an Open in new tab button. It's a quick way for people to jump from viewing the file on your page to editing it in OneDrive or SharePoint.

 

To adjust the width of your embedded Microsoft Word, Excel, or PowerPoint file

Select the embedded file, then choose a width from the floating toolbar that appears:

Floating toolbar presented when selecting a macro while editing

This app uses the Microsoft Graph API. We try our best to stay in sync with their API updates. If they’ve recently updated their API, it’s possible you’ll see some unexpected behavior.

Installing the app

You'll need to be an administrator to install the Microsoft OneDrive for Business (Beta) app.

To install:

  1. Navigate to your site settings by clicking Settings in the Confluence sidebar.

  2. Click Find new apps in the Atlassian Marketplace section of the Confluence sidebar.

  3. Search forMicrosoft OneDrive for Business (Beta)”.

  4. Follow the prompts.

Data security and privacy

The Microsoft OneDrive for Business (Beta) app saves the following configuration data:

  • Your Confluence host key

  • Your Confluence and Atlassian Connect shared secret

  • Your Atlassian account ID

  • Your access token from the Microsoft OneDrive API

  • Your refresh token from the Microsoft OneDrive API

Content in Microsoft OneDrive or SharePoint files is not stored by the Microsoft OneDrive for Business (Beta) app.

Instead, data is stored in Postgres databases in Amazon’s cloud offering, Amazon Web Services (AWS), which is protected by username/password credentials.

Ultimately, no data is sent to any services, apart from:

  • The Microsoft OneDrive API

  • The Microsoft OneDrive for Business (Beta) app

  • Your Confluence instance

  • AWS infrastructure

Also, to prevent eavesdropping, communications among the Microsoft OneDrive API, the Microsoft OneDrive for Business (Beta) app, and Confluence all use HTTPS.

Revoking access

You can revoke access to the Microsoft OneDrive for Business (Beta) app in your Microsoft account settings. Once revoked, access will expire in a couple of hours.

 

Additional Help