---
title: "Create a profile integrated with Microsoft OneDrive"
canonical: "https://support.appfire.com/space/CVP/69174152/Create%20a%20profile%20integrated%20with%20Microsoft%20OneDrive"
format: markdown
---
> Macro (aura-html)

<span style="color: #000000">Visio diagrams can be rendered from remote locations and external applications such as GitLab, GitHub, and so on. Since 5.3.0 release, the </span><span style="color: #000000">*Visio for Confluence*</span><span style="color: #000000"> app can access and render Visio diagrams located in Microsoft OneDrive. This article contains instructions to integrate OneDrive with Confluence with the aim of preserving data security </span><span style="color: #000000">and privac</span><span style="color: #000000">y.</span>

## <span style="color: #000000">Before you begin</span>

- <span style="color: #000000">Know how to create and use profiles. Refer to the following resources:</span>
  - <span style="color: #000000">[Create profiles with URLs](https://appfire.atlassian.net/wiki/x/T4IfB)</span>
  - <span style="color: #000000">[How to use URLs with Visio Viewer macro to render diagrams](https://appfire.atlassian.net/wiki/x/6YEfB)</span>
- <span style="color: #000000">Understand why an application must be created using Microsoft Azure. An application created in Microsoft Azure acts like an interface that allows Confluence to access the Microsoft OneDrive content, and at the same time, provides an additional layer of security. A Confluence administrator must grant access to this application using his/her Microsoft credentials to establish the integration. This enables Confluence to be linked to Microsoft OneDrive and render Visio content in OneDrive on Confluence pages.</span>

## <span style="color: #000000">Steps</span>

<span style="color: #000000">The following sections explain how to create a </span><span style="color: #000000">link between Confluence and Microsoft OneDrive,</span><span style="color: #000000"> and how to use a OneDrive profile to render your Visio content on your Confluence pages:</span>

1. <span style="color: #000000">[Register an application using the Microsoft Azure portal](#CreateaprofileintegratedwithMicrosoftOneDrive-vis53_tutl_1Drive_appRegister)</span>
2. <span style="color: #000000">[Create the interface between OneDrive and Confluence](#CreateaprofileintegratedwithMicrosoftOneDrive-vis53_tutl_1Drive_profile)</span>
3. <span style="color: #000000">[Use the OneDrive profile with the ](#CreateaprofileintegratedwithMicrosoftOneDrive-vis53_tutl_1Drive_macro)</span><span style="color: #000000">*[Visio Viewer](/wiki/pages/resumedraft.action?draftId=69174152#CreateaprofileintegratedwithMicrosoftOneDrive-vis53_tutl_1Drive_macro)*</span><span style="color: #000000">[ macro](/wiki/pages/resumedraft.action?draftId=69174152#CreateaprofileintegratedwithMicrosoftOneDrive-vis53_tutl_1Drive_macro)</span>

### > Macro (anchor)

<span style="color: #000000">Register an application using the Microsoft Azure portal</span>

1. <span style="color: #000000">Register an application through App </span><span style="color: #000000">registrations</span><span style="color: #000000"> in the</span> <span style="color: #000000">Microsoft Azure</span> portal. <span style="color: #000000">Refer to</span> <span style="color: #000000">[this link](https://docs.microsoft.com/en-gb/onedrive/developer/rest-api/getting-started/authentication?view=odsp-graph-online)</span><span style="color: #000000"> for Microsoft related instructions.</span>
  1. Open <span style="color: #000000">the</span> [Microsoft Azure portal](https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade) <span style="color: #000000">and log in to the relevant business or personal Microsoft account.</span>
  2. <span style="color: #000000">Click </span><span style="color: #000000">*New registration*</span><span style="color: #000000"> or </span><span style="color: #000000">**Register an application **</span><span style="color: #000000">to create a new application.</span>
  3. <span style="color: #000000">Enter a meaningful name</span><span style="color: #000000"> for the application to be used when creating a profile in </span><span style="color: #000000">*Visio for Confluence*</span><span style="color: #000000">.</span>
  4. <span style="color: #000000">Select the required access level for this application in </span><span style="color: #000000">*Supported account types*</span><span style="color: #000000">.</span>
  5. <span style="color: #000000">Select </span>*Web*<span style="color: #000000"> and enter </span>`https://<confluence_base_url>/admin/plugins/org.swift.confluence.visio/visioonedrive.action`<span style="color: #000000"> in the text box provided in </span>*Redirect URI (optional)*<span style="color: #000000">. Replace </span>`<confluence_base_url>`<span style="color: #000000"> with the base URL of your Confluence instance.</span>
  6. <span style="color: #000000">Click </span><span style="color: #000000">**Register**</span><span style="color: #000000">. The app gets registered and the </span><span style="color: #000000">*Application (client) ID*</span><span style="color: #000000">, used for all account types, and </span><span style="color: #000000">*Directory (tenant) ID*</span><span style="color: #000000">, used with work accounts, is displayed.</span>
  7. <span style="color: #000000">Select </span><span style="color: #000000">*Certificates & secrets*</span><span style="color: #000000"> to create a client secret. The application uses the client ID and the secret for authentication to generate an access token for a profile in Confluence.</span>
  8. <span style="color: #000000">Click </span><span style="color: #000000">**New client secret**</span><span style="color: #000000"> and a pop-up window appears. Enter a description for the client secret, select the required validity of the client secret, and click </span><span style="color: #000000">**Add**</span><span style="color: #000000">.</span>
2. <span style="color: #000000">Copy the following values  in a secure place:</span>
  1. <span style="color: #000000"> Client secret: This value is not shown again if another operation is performed or if you leave the page. </span>
  2. <span style="color: #000000">Client ID: This </span><span style="color: #000000">*Application (client) ID*</span><span style="color: #000000"> value is shown on the Overview page of the newly created application. </span>
  3. <span style="color: #000000">Tenant ID: If integrating with a work account, this value is also shown on the Overview page of the newly created application.</span>

> ℹ️ <span style="color: #000000">Authenticating an application with Microsoft user credentials from Confluence provides the optimal method to protect your data and privacy. Profiles</span> <span style="color: #000000">allow</span><span style="color: #000000"> multiple users to access a OneDrive account across pages and instances of the </span><span style="color: #000000">*Visio Viewer*</span><span style="color: #000000"> macro.</span>

### > Macro (anchor)

<span style="color: #000000">Create the interface between Microsoft OneDrive and Confluence</span>

1. <span style="color: #000000">In your Confluence instance, navigate to </span>> Macro (inline-media-image)

<span style="color: #000000">*** > Manage apps > Bobswift Configuration > Visio > Profiles***</span><span style="color: #000000">, and click </span><span style="color: #000000">**Add profile**</span><span style="color: #000000">.</span>
2. <span style="color: #000000">Specify </span><span style="color: #000000">*Profile type*</span><span style="color: #000000"> as </span><span style="color: #000000">*OneDrive*</span><span style="color: #000000">, paste the copied client ID in </span><span style="color: #000000">*OneDrive client ID*</span><span style="color: #000000">, and paste the copied client secret value in </span><span style="color: #000000">*OneDrive client secret*</span><span style="color: #000000">. To access a work account, also paste the tenant ID in </span><span style="color: #000000">*OneDrive tenant ID*</span><span style="color: #000000">.</span>
3. <span style="color: #000000">**Authorize**</span><span style="color: #000000"> to create an interface from the </span><span style="color: #000000">*Visio for Confluence*</span><span style="color: #000000"> app with the OneDrive account. </span>
4. <span style="color: #000000">A Microsoft login window appears to grant permissions to the app created in the previous section. If you did not log in Microsoft yet, a login window opens which prompts you to log in and you must provide the credentials of the user who created the app. Click </span>**Yes**<span style="color: #000000"> to grant access to the app to read the OneDrive files. </span>
5. <span style="color: #000000">An access token is generated and is automatically filled in the </span><span style="color: #000000">*Access token*</span><span style="color: #000000"> field if the app is granted access.</span>
6. <span style="color: #000000">**Save**</span><span style="color: #000000"> the profile. </span>

<span style="color: #000000">The integration between OneDrive and the registered app is now complete and the profile can be used to render Visio diagrams onto Confluence pages. The following screenshot displays the order to be followed when creating the profile linked to OneDrive:</span>

![Image shows how to configure a profile with the newly created OneDrive integration.](media://e6ef728b-40d4-46c0-b6dd-ac342692f12a)

> ⚠️ ### About access tokens:
> ⚠️ 
> ⚠️ - <span style="color: #000000">The access token used stays valid until the validity of the client secret value given in the Microsoft portal expires.</span>
> ⚠️ - <span style="color: #000000">If the client secret expires or is lost before copying the value, create a new client secret as mentioned in step 'g' of the </span><span style="color: #000000">[Register an application using Microsoft Azure](#CreateaprofileintegratedwithMicrosoftOneDrive-vis53_tutl_1Drive_appRegister)</span><span style="color: #000000"> section. Paste the new client secret value in the Add profile window.</span>

### > Macro (anchor)

<span style="color: #000000">Use the OneDrive profile in the </span><span style="color: #000000">*Visio Viewer*</span><span style="color: #000000"> macro</span>

1. <span style="color: #000000">Go</span><span style="color: #000000"> to the require</span><span style="color: #000000">d Confluence page, and add a </span><span style="color: #000000">*Visio Viewer*</span><span style="color: #000000"> macro or edit an existing macro to open the macro editor.</span>
2. <span style="color: #000000">Select the newly created profile in </span><span style="color: #000000">*Profile.*</span>
3. <span style="color: #000000">Enter the relative path of the Visio file to be rendered in </span><span style="color: #000000">*URL to Visio file*</span><span style="color: #000000">.</span>
4. <span style="color: #000000">See a </span><span style="color: #000000">*Preview,*</span><span style="color: #000000"> or </span><span style="color: #000000">**Save**</span><span style="color: #000000"> and </span><span style="color: #000000">**Publish**</span><span style="color: #000000"> your page.</span>

![Add profile to Visio Viewer macro.](media://c56c807b-1968-4bd5-a566-854b4e35c279)