Overview
This guide shows you step by step guide to set up a new integration project with Microsoft OneDrive allowing files stored in OneDrive to be added to Documents.
⚠️ 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.
How to
Step 1: Log in to Microsoft Azure Portal
Login to 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: Setup 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 offered
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 Documents application
Click to add a document using the OneDrive option
On the next screen click to 'Browse OneDrive Documents' and you will be prompted to authorise your access.
Troubleshooting:
If you can't see the option to add OneDrive, please check Admin > Documents and make sure ERMS_CONFIG_ONEDRIVE_LINKS
is set to ON, Please contact our support team if you need further assistance.
To make these changes, navigate to Admin > System > Configuration and search for cfg_docs_features