SharePoint Migration

A SharePoint Migration Walkthrough

A real Microsoft Graph connection, a live folder browser, and the same OCR pipeline every other upload goes through — but a button-triggered batch import today, not a background sync. Here's exactly what happens, and how a folder actually gets matched to a unit.

A real connection, run manually rather than left running.

The parts that sound ambitious are genuinely built; the part that sounds passive isn't there yet — worth knowing before treating this as a "connect once and forget it" pipe.

What's real today

Genuine Azure AD app-registration OAuth2, a live Microsoft Graph folder browser, a working "Test connection" button, and files that go through the identical OCR/LLM extraction and privacy handling as a phone upload — including the driver-licence purge.

How import actually runs

A deliberate batch, not a silent background sync: importing happens when someone clicks "Import" or "Import all," so a fleet decides exactly when new or updated files enter the OCR pipeline instead of finding out after the fact.

An Azure app registration, not a personal login.

DocVigia connects as an application, not as a person's SharePoint account — a tenant ID, a client ID and a client secret from an Azure AD app registration, entered once on the SharePoint settings screen. The secret is encrypted at rest and never sent back to the browser after it's saved; the screen only shows whether one exists.

  • "Load libraries" fetches real drives. Rather than typing a document library name and hoping it's right, a live call to Graph lists the actual libraries so it's picked from a dropdown.
  • "Test connection" hits the real token endpoint. It's not a cosmetic check — it actually exchanges the client credentials for a token, the same call the import itself makes.
  • A base folder path scopes what's visible. Everything the folder browser and the import can see is rooted under that path — narrower than the whole library if that's what a tenant sets.

A folder and filename convention — no configuration screen to maintain.

What matches a file to a unit and document type is the folder and file name themselves. Name things right on the SharePoint side and an import lands correctly — no separate mapping rules to keep in sync with how a fleet actually organizes its library.

Convention Example
Folder = plate + unit code 33MN9R_S-0551
Filename keyword → document type "poliza" or "seguro" → insurance
Numeric prefix fallback 01_ → front plate photo

Once a file is matched to a unit and a document type, it runs through the same pipeline a phone photo does — OCR/LLM field extraction, versioned filing, and the same quality-based handling when two files land on the same document type: the more complete, more readable one wins rather than whichever arrived last.

Browse, select, import — staged, not automatic.

The import screen is a live folder browser against the connected library: pick a distribution center, then either select specific unit folders and files or click "import all." Nothing uploads until that selection is submitted, and a recent-imports panel tracks each file's status afterward, OCR validation badge included.

What "manual" actually protects against

A run caps at 5,000 files and 8 folder levels deep, and reports when it's been truncated rather than silently cutting off — worth knowing for a library larger than that. If a connection drops mid-import, the job resumes on its own the next time the server starts, the same recovery mechanism that protects an interrupted phone upload — nothing has to be re-selected from scratch.

Questions about the migration.

Does DocVigia keep our SharePoint library and DocVigia in sync automatically?

Not today. The connection stays saved so re-running an import is quick, but nothing runs on a schedule in the background — someone triggers each import from the SharePoint screen when they want new or updated files pulled in.

How does DocVigia know which file belongs to which unit?

By the folder and file names themselves — a folder named with the plate and unit code, and a filename that contains a recognizable keyword or numeric prefix for the document type. No separate mapping screen to configure and keep in sync; get the naming convention right and the import lands correctly.

Are driver's-licence photos handled differently when they come from SharePoint?

No — the same rule applies regardless of source: a licence image is deleted immediately after OCR extraction, only the expiry date is kept, and a licence can't be filed as a unit-level document at all; it's rejected with a message pointing to HR instead.