EnrolHQ to Sharepoint Integration
Microsoft SharePoint is a document management and storage platform used widely by Australian K-12 schools for internal file storage.
Integration Overview
The EnrolHQ to SharePoint integration transfers enrolment documents from EnrolHQ into a SharePoint document library, one way only. Once a family completes the application and orientation process, EnrolHQ files their documents into SharePoint with a single button press. This suits schools that cannot yet sync documents into their SIS.
The integration:
- Creates the folder structure defined by the school
- Sorts each document into a category folder based on its file name
- Uploads the file
It carries across both parent-uploaded documents and EnrolHQ-generated PDFs.
Parent-uploaded documents: birth certificates, immunisation history statements, school reports, NAPLAN results, medical reports, diverse learning reports.
EnrolHQ-generated PDFs: application and enrolment forms, acceptance of place, custom forms, interview notes, communication log summaries.
The integration doesn't support the following. Handle these manually in SharePoint:
- Student and parent record sync: documents only, no enrolment data is written
- Filtering by verification status: every document held against the student transfers, whether or not staff have verified it
- Replacing or removing documents already in SharePoint
- Re-sync deduplication: running a sync again uploads a second copy rather than skipping documents sent previously
- More than 100 documents per student per sync
- Reading documents from SharePoint back into EnrolHQ
Under the hood, the sync calls the Microsoft Graph API: PUT against /drives/{drive_id}/items/{folder_id}:/{file_name}:/content to upload each file, creating folders on demand along the path. Authentication uses an OAuth2 client_credentials grant. EnrolHQ exchanges the school's tenant ID, client ID and client secret at login.microsoftonline.com for a short-lived Bearer token against the https://graph.microsoft.com/.default scope, and refreshes it automatically.
How to Set Up
To connect EnrolHQ to a school's SharePoint tenancy, the school's Microsoft administrator creates a dedicated app registration in the Microsoft Entra admin centre, then provides EnrolHQ with the following credentials:
- Tenant ID: under Entra ID > Overview
- Client ID: the Application (client) ID, shown after creating the app registration under App registrations > New registration
- Client Secret: create under Certificates & secrets and send to EnrolHQ securely, via Bitwarden or OneTimeSecret. The value displays once only
- Drive URL: the Microsoft Graph URL of the target document library, in the form https://graph.microsoft.com/v1.0/drives/{drive_id}
- Token URL: the Microsoft login authority, normally https://login.microsoftonline.com
Pre-requisites on the Microsoft Side
- Create the destination document library (drive) in SharePoint before setup. EnrolHQ creates folders inside it, but not the library itself
- Grant the app registration Microsoft Graph application permissions (not delegated) with admin consent, so it can create folders and upload files in the target library
- Note the client secret's expiry date. When the secret expires, the sync stops working and the school must issue a new secret to EnrolHQ
EnrolHQ doesn't require a separate SharePoint Site ID.
Once EnrolHQ receives these credentials, it runs a proof-of-connection test against a single test student to confirm the token exchange works and documents land in the expected folders. EnrolHQ then schedules a short demonstration meeting with the school before running any bulk sync.
Mappings
The integration maps EnrolHQ values onto the school's SharePoint folder structure. Configure mappings during the setup:
- Folder structure: a template describing the folder path each document is filed into
- Document categories: file name keywords that determine which category folder a document belongs in
- Default category: where documents that match no keyword are filed
Folder Structure
EnrolHQ renders the folder template per document and creates any folder in the path that doesn't yet exist. The default template is:
Students/{category}/Alumnae {grad_year} (Year {entry_grade} {entry_year})/{student_folder}
The available variables are:
- {category}: the matched document category, or the default category
- {entry_year}: the student's year of entry
- {entry_grade}: the student's year level at entry
- {grad_year}: the year the student is due to complete Year 12, calculated as entry_year + 12 - entry_grade
- {floored_entry_year}: the year the student's Year 7 cohort starts, calculated as entry_year - (entry_grade - 7)
- {floored_entry_grade}: always 7
- {external_id}: the student's external ID
- {first_name}: the student's first name
- {last_name}: the student's last name
- {dob_iso}: date of birth as YYYY-MM-DD
- {student_folder}: legacy combined value, see below
EnrolHQ lower-cases and hyphenates name values used in a folder name, so "Jane O'Brien" becomes jane-o-brien. If a student has no entry year or entry grade recorded, the year-based variables resolve to empty text, which can leave gaps in folder names.
Combine variables explicitly to name a student's folder, for example {external_id}-{last_name}-{first_name}-{dob_iso}, which produces 12345-smith-jane-2011-03-04. EnrolHQ retains the {student_folder} shorthand for existing schools. It expands to {external_id}-{first_name}-{last_name}, with the first name before the last name and no date of birth, and it does not fall back to a generated code when the student has no external ID. Use the explicit variables for new setups.
Document Categories
Configure categories as a JSON object during setup. Each key is a category folder name, and each value is a list of keywords matched against the document's file name:
{ "Medical": [ "Immunisation", "Diagnosis-Assessment_Specialist", "Supporting_Medical_Documents_" ], "Learning": [ "NAPLAN", "School_Report", "Individual_Education_Plan" ], "Confidential": [ "Passport", "Court_Orders_", "australian_citizenship_certificate" ], "Enrolments Docs": [ "Pre-commencement_update", "Application", "_Enrolment_Offer", "Birth_Certificate" ] }
EnrolHQ substitutes the matched category into {category} in the folder template. EnrolHQ files any document whose file name matches no keyword into the default category, "Confidential" unless the school changes it. Review the keyword lists during setup so documents don't end up in Confidential by mistake.
Syncing from EnrolHQ
Pressing the Sync SharePoint button on the student's profile runs the following steps:
- Retrieve documents: EnrolHQ fetches the documents held against the student's profile, up to 100 per sync
- Categorise: EnrolHQ matches each document's file name against the configured keywords to select its category folder, falling back to the default category if none match
- Resolve the folder: EnrolHQ renders the folder template with the student's data and creates each folder in the path that doesn't already exist
- Name the file: EnrolHQ builds the uploaded file name as {external_id}{document_name}{upload_date}.{extension}, prefixed with the document's group kind, and strips digits and hyphens from the document name. If a file of that name already exists in the destination folder, EnrolHQ appends a number rather than replacing the existing file
- Upload: EnrolHQ sends each file to SharePoint in a single request
- Delivery and result: EnrolHQ processes documents one at a time. A failure on one document doesn't stop the rest. EnrolHQ reports failures on the sync result along with the folder or file involved. A bulk sync runs the same steps across a group of students
Re-sync if documents change afterwards. A re-sync adds numbered copies rather than replacing what's already in SharePoint.
Last reviewed: