Allowing Microsoft OneDrive Links in Documents

This guide shows the steps required to set up an integration with Microsoft OneDrive, allowing files stored in OneDrive to be linked within the Intranet.

⚠️ This feature is available from Claromentis 8.5+, your site must be using 'https://' and be publicly accessible (no VPN or RDP required) for the API to work.

If you can't see the option to add OneDrive in Documents, please check Admin > Documents and make sure ERMS_CONFIG_ONEDRIVE_LINKS is set to ON.

(If it is not on, please raise a support ticket for our team to assist you)


 

Step 1: Log in to the Microsoft Azure Portal
 

https://portal.azure.com


Log in to the Microsoft Azure Portal with your Microsoft ID or register if you don't have one.

You need to register a new application by searching for App Registration:

 


 

 - Name your system name for example, "My Intranet OneDrive Picker"

 - Supported account types: Choose between Organisation only and or allowing a personal Microsoft account too

 - Redirect URI: set to Web  https://{yourcompany.myintranet.com}/intranet/documents/onedrive_callback.php

 - Click: Register

 

Step 2: Set up API permission
 

Click on 'View API permissions':

 

Add API permission for the following:

Microsoft Graph > Delegated Permission

  • Files.Read
  • Files.Read.All
  • Files.Read.Selected
  • User.Read

 

Step 3: Set up Authentication - Implicit Grant


The redirect URL was configured in Step 1, so now under Advanced Settings, make sure Implicit Grant Flow authorisation via Access tokens and ID tokens have their boxes checked:

 


Step 4: Branding (optional)
 

 

Step 5: Copy Application (Client) ID
 

Before you leave the portal and start using the details given to set up the OneDrive API in Claromentis, make sure you copy the Application (client) ID - (field shown below that is obscured)

 

 

Step 6: Set up API Integration in Claromentis

 - In Claromentis, navigate to Admin > System > API keys

 - Click Add New Integration

 

Enter the below for each field:
 

API Name: onedrive_picker

API Description: OneDrive Document Picker

Entry Key: client_id

Entry Value: {paste value of Application (client) ID here that you copied}

 

Step 7: Testing & Verification
 

Head to the front end of Documents (Applications > Documents)

Use the option under the 3 dot menu to add a OneDrive link:

 

On the next screen, click to 'Browse OneDrive Documents' and you will be prompted to authorise your access.

 

Once added, the link to the file will appear in your chosen Intranet folder location.

 

Document Preview
 

The majority of files from OneDrive can't be previewed directly in the Documents application; instead, a message will appear, and the user can click "View Documents" to access the document.

 

The file types that OneDrive allows to be embedded and therefore will have a preview in the Intranet:

doc, docx Microsoft Word Documents
xls, xlsx Microsoft Excel File
odt, ods Open Document Text File and Open Document Spreadsheet


Unfortunately, OneDrive PDF files do not allow themselves to be embedded, so no Intranet preview can be created for these.

Whether a preview appears is not something that can currently be changed, as the document URL provided by OneDrive does not allow its content to be embedded and create the preview.

Consider uploading files into the Claromentis documents application to use its preview instead of linking to OneDrive if a preview for them is more critical than where they are stored.


Log in prompt

As the link is just that and not the actual file, users will be prompted to log into Microsoft when following a OneDrive link in the Intranet (by clicking 'view document' in the Intranet)
The permissions set in OneDrive will then allow or restrict the user from viewing/downloading the file once they log in.



 

Further information

Last modified on 16 July 2025 by Hannah Door

4679 Views   

Share