SharePoint
primedocs integrates directly into Microsoft SharePoint document libraries via a SharePoint app. The app adds a primedocs button to the SharePoint toolbar, allowing users to create documents from primedocs templates and save them straight into the document library.
Overview
Clicking the toolbar button opens the primedocs web application inside SharePoint. After the user selects a template, fills in the form, and confirms, the generated document is saved automatically into the SharePoint document library the button was triggered from.
Prerequisites
- Office 365 / Entra ID (Azure Active Directory) authentication is required. Documents are stored in SharePoint on behalf of the signed-in user.
- The Entra ID App Registration requires the delegate permissions
Sites.ReadWrite.AllandFiles.ReadWrite.All. - Only web-compatible primedocs templates are supported.
How It Works
- The SharePoint app is installed via a
.sppkgpackage through the SharePoint Admin Centre. - A SharePoint list called
primedocsSettingsis created in the root of the site, with an entryTemplatePickerUrlpointing tohttps://{INSTANCE-NAME}/app/web/sharepoint. - When the user clicks the toolbar button, the app appends six query parameters to the
TemplatePickerUrlso that primedocs can store the document in the correct library.
URL parameters
The app reads the values from the SharePoint page context and passes them to primedocs Web:
| Parameter | Value | Meaning |
|---|---|---|
saveLocationSharePointSiteId | GUID | ID of the SharePoint site (site collection) the library belongs to. |
saveLocationSharePointSiteName | Display name | Title of the site (display only). |
saveLocationSharePointFolderPath | Server-relative sub-path | Current folder relative to the library (library root stripped off). Empty at the library root. |
saveLocationSharePointListId | GUID | ID of the document library (SharePoint list). |
saveLocationSharePointListName | Display name | Title of the document library (display only). |
saveLocationSharePointUrl | Absolute URL (URL-encoded) | Address of the SharePoint library page the button was opened from (used for the "back" link). |
To save the document, primedocs uses the three parameters saveLocationSharePointSiteId, saveLocationSharePointListId and saveLocationSharePointFolderPath (storage via Microsoft Graph). The other three (…SiteName, …ListName, …Url) are used for display in the browser only.
Example URL (values truncated):
https://{INSTANCE-NAME}/app/web/sharepoint?saveLocationSharePointSiteId=a1b2c3d4-…&saveLocationSharePointFolderPath=/Contracts/2026&saveLocationSharePointListId=f9e8d7c6-…&saveLocationSharePointSiteName=Legal&saveLocationSharePointListName=Documents&saveLocationSharePointUrl=https%3A%2F%2Fcontoso.sharepoint.com%2F…
Installation
For step-by-step installation instructions, see Microsoft SharePoint App Installation.