OptimiDoc Server Help Center

OneDrive

The OneDrive print connector turns a Microsoft OneDrive folder into a browsable print source. A signed-in user opens the connector at the device panel, browses OneDrive, and selects a document -- OptimiDoc downloads it on demand, converts it to PDF if needed, and prints it as a job owned by that user. Both personal OneDrive and OneDrive for Business (Microsoft 365) are supported.


https://optimidoc.atlassian.net/wiki/download/attachments/42402031/connector-onedrive.png?api=v2

Screenshot: OneDrive connector configuration

Overview

The OneDrive connector is a browse-on-demand print source, not a background watcher. OptimiDoc does not poll OneDrive or copy files automatically. The connector appears in the list of print sources on the device; the user browses the folder, picks a file, and only then is it downloaded and printed. The file stays in OneDrive untouched.

OneDrive comes in two connector types:

  • OneDrivePersonal -- for personal Microsoft accounts.

  • OneDriveBusiness -- for OneDrive for Business as part of Microsoft 365, with optional tenant-wide admin consent.


How It Works

  1. The user authenticates at an OptimiDoc-enabled device and opens the OneDrive connector.

  2. OptimiDoc uses the stored OAuth token and the Microsoft Graph API to list the folder.

  3. The user browses and selects one or more documents, which are downloaded on demand and converted to PDF if needed.

  4. A print job is created, owned by the signed-in user, and released through the rules engine and quota checks.


Configuration -- OneDrive Personal

Select OneDrivePersonal as the type and complete:

Setting

Description

Path

The OneDrive folder to browse (e.g. /Documents/Scans). Leave empty to start at the root.

Client ID

The Application (client) ID of your Microsoft Entra app registration.

Return URL

The OptimiDoc callback URL registered as the app's redirect URI (e.g. https://server.example.com/).

Overwrite Existing Files

Replaces files of the same name when the folder is also used as a write target. Not relevant to browse-and-print.


Configuration -- OneDrive Business

Select OneDriveBusiness as the type. In addition to the personal fields, business adds a Tenant ID and an Admin Consent option:

Setting

Description

Path

The OneDrive for Business folder to browse.

Client ID

The Application (client) ID from the Microsoft Entra app registration.

Tenant ID

The Directory (tenant) ID of your Microsoft 365 organisation.

Return URL

The OptimiDoc callback URL registered as the app's redirect URI.

Overwrite Existing Files

As above.

Admin Consent

Authorise the application for the whole tenant by a Microsoft administrator instead of per-user authorisation. When enabled, a Client Secret and an Import source (the configured Azure AD directory) are also required.


Registering the Entra Application

In the Microsoft Entra admin centre, create an app registration under App registrations > New registration, set the redirect URI to the OptimiDoc callback, and note the Application (client) ID and (for business) the Directory (tenant) ID. Grant the Microsoft Graph permissions needed to read files. For tenant-wide access, create a Client secret and grant admin consent.


Authorising the Connection

  1. Reopen the saved connector by clicking its row.

  2. In the OAuth Authorization card, click Authorize, sign in to Microsoft, and consent. The status then shows Authorized.

Use Re-authorize to refresh tokens, or Revoke authorization to clear them locally.


Troubleshooting

Issue

Resolution

Authorisation fails

Verify Client ID, Tenant ID, and that the redirect URI in Entra matches the Return URL.

Insufficient permissions

Ensure the required Graph permissions are granted, and that admin consent is given when Admin Consent is enabled.

Folder not found

Confirm the Path exists and starts with a forward slash.


Related articles