Sunday, December 28, 2025

SharePoint Online + Acumatica Integration Architecture (Using SPFx & OAuth2)

Modern SPFx + OAuth2 + Acumatica ERP Integration

Integrating SharePoint Online with Acumatica ERP allows organizations to bring core ERP data—such as Stock Items, Customers, Vendors, Sales Orders, and Cases—directly into a modern SPFx web part. This post shows how authentication, tokens, and data flows work together in a secure enterprise-ready design.


🌐 High-Level Architecture

The following diagram shows the full end-to-end architecture:


Figure 1 — SharePoint–Acumatica Integration Architecture


1️⃣ Solution Overview

The SPFx web part enables users to:

  • Filter and browse Acumatica entities
  • Select entity items and display fields in real time
  • Optionally save entity fields into a SharePoint list
  • Work with either cached or live ERP data

2️⃣ Architecture Components

🔹 SharePoint Online

  • Hosts SPFx UI
  • Stores selected entity data in lists
  • Authenticates via Microsoft Entra ID (MSAL)

🔹 SPFx Web Part

  • React-based UI
  • Calls backend API using access token
  • Stores access + refresh tokens
  • Displays live or saved Acumatica data

🔹 Integration API (Azure Function / App Service)

  • Handles authentication to Acumatica
  • Stores and refreshes tokens
  • Executes REST calls securely

🔹 Acumatica ERP

  • Exposes REST API
  • Supports OAuth2 & Azure AD SSO
  • Returns requested entities

3️⃣ Authentication Flows

Three authentication models can be used depending on business and security needs.

🔵 Flow A: Service Account (Admin Credentials)

A backend service account authenticates to Acumatica and returns ERP data to SharePoint. This is easiest for read-only, system-level operations.

🟢 Flow B: User Credentials (OAuth 2.0 Authorization Code)

Users enter their Acumatica credentials. Access token is issued per user, respecting their permissions in Acumatica.

🟣 Flow C: Azure AD SSO (Recommended)

Provides seamless login between SharePoint and Acumatica using the same Entra ID identity.


4️⃣ Token Lifecycle

SPFx stores and uses the following:

  • Access Token
  • Refresh Token
  • Expiry Time

When the access token expires, the refresh token is used to obtain a new one automatically. No user interaction needed.


5️⃣ Data Delivery Modes

🔹 Local Mode (Cached Data)

  • Selected entity fields saved in SharePoint list
  • Fast page load
  • Best for stable master-data

🔹 Live Mode (Real-Time API Calls)

  • Data fetched from Acumatica on every page load
  • No duplication of ERP data in SharePoint
  • Ideal for dynamic data (orders, quantities, QC updates)

6️⃣ High-Level Data Flow

  1. User opens the SharePoint page
  2. SPFx authenticates using MSAL
  3. SPFx queries the Integration API
  4. API manages token lifecycle
  5. Acumatica returns requested entity data
  6. SPFx outputs or stores the data

7️⃣ Why This Architecture Works

  • Secure (OAuth2 + Azure AD)
  • No credentials stored client-side
  • Supports real-time and cached modes
  • Scalable using Azure Functions
  • Works with enterprise SSO


Part 1 - Acumatica Files -> SharePoint DMS Integration

Part 2 - SharePoint DMS -> Acumatica Files Integration

Displaying SharePoint Files Inside a Custom Acumatica Screen

Allow Users to Fetch Files From SharePoint Into Acumatica Entities

Many organizations use SharePoint Online as their primary document management system while relying on Acumatica as their ERP. A common requirement is enabling users to view SharePoint files inside Acumatica and selectively attach them to ERP entities such as:

  • Sales Orders
  • Purchase Orders
  • Vendor Profiles
  • Customer Accounts
  • Cases / Projects
  • Quality Documents (QC)
  • Any custom entity

This article describes an architecture where a custom Acumatica screen displays files from a SharePoint library. Users can select a document and import it into Acumatica as an attachment.


1. Overview

A custom screen is added to Acumatica that connects to a SharePoint document library. The integration supports:

  • Viewing SharePoint files within Acumatica
  • Filtering files based on metadata
  • Previewing files
  • Selecting one or multiple files
  • Attaching selected files into Acumatica entities

The integration works using either:

  • Azure AD SSO (user identity flows from Acumatica to SharePoint), or
  • Azure App Authentication (client credentials for system-to-system calls).

2. Authentication Options

Option 1 — SSO Authentication (Recommended)

  • Acumatica user logs in via Azure AD
  • The same identity is used to call SharePoint
  • No additional login required
  • Ensures user-based permissions on SharePoint
  • True single sign-on experience

Option 2 — Azure App (Client Credentials)

  • Background service or Acumatica server calls SharePoint
  • Uses App Registration (Client ID + Secret or Certificate)
  • Useful when document visibility does not depend on user rights
  • Consistent system identity for auditing

Both models allow Acumatica to securely communicate with SharePoint using the Microsoft Graph API.


3. What the Custom Screen Does

3.1 Fetch SharePoint Files

The custom screen retrieves the following information from SharePoint:

  • File names
  • Versions
  • Metadata
  • Approval status
  • Last modified date
  • Secure, time-bound download URL

Files are displayed inside Acumatica using a grid or panel.

3.2 Select and Import

  • User selects one or more files
  • Acumatica requests the file binary from SharePoint
  • File is securely returned via API
  • Document is attached to the selected entity (SO, PO, Vendor, etc.)

3.3 Metadata Mapping

Typical metadata synced from SharePoint:

  • Document Category
  • Entity ID (e.g., SO000234)
  • Entity Type (SalesOrder, PurchaseOrder, Customer, Vendor)
  • Uploaded By
  • Approval Workflow Status

4. Architecture

High-Level Flow

Acumatica Custom Screen → Integration API (optional) → Microsoft Graph → SharePoint Library

Steps in Detail

  1. User opens the custom screen in Acumatica
  2. Screen retrieves SharePoint library items
  3. Metadata and file information is displayed
  4. User selects files and clicks Import
  5. SharePoint returns the file binary
  6. Acumatica attaches the document to the target entity

If an Azure Function is used as middleware, it handles:

  • OAuth2 / SSO token management
  • Secure Graph API calls
  • Normalized JSON responses

5. Typical Use Cases

Finance

Attach invoice PDFs or bank receipts stored in SharePoint to AP/AR transactions.

Procurement

Link vendor quotes, contracts, and specifications to Purchase Orders.

Sales

Attach proposals, agreements, and customer documents.

Quality (QC)

Pull approved certificates and inspection reports into Acumatica.

Projects

Attach drawings, CAD files, and site documentation stored centrally.


6. Benefits

  • Centralized document management in SharePoint
  • No manual download and re-upload
  • Approval-driven governance before ERP usage
  • Consistent security using Azure AD
  • Improved user experience within Acumatica
  • Full audit trail using SharePoint and ERP metadata
  • Higher data quality through metadata mapping

7. Conclusion

This integration allows Acumatica to consume approved, metadata-rich documents directly from SharePoint, providing a seamless and secure way to attach files to ERP entities.

Result:

  • SharePoint for document storage
  • Approval workflows via SharePoint / Power Automate
  • Acumatica for business processing


Part 1 - Acumatica Files -> SharePoint DMS Integration

Part 3 - Acumatica Entity -> SharePoint List/Pages Integration

Thursday, December 25, 2025

Acumatica - SharePoint DMS Integration
SPFx Library Extension + Approval Workflow

SharePoint–Acumatica DMS Integration — SPFx Library Extension

SharePoint Online is a powerful DMS (versioning, metadata, workflows). Acumatica is the ERP system of record. This integration routes documents through SharePoint libraries, enforces approval and metadata, and only publishes validated documents into Acumatica.


Overview

A custom SPFx Library Extension adds two actions to document libraries:

  • Get From Acumatica — Fetch attachments from Acumatica into the current library.
  • Publish to Acumatica — Push approved SharePoint files into Acumatica as attachments.

All uploaded files are routed through the SharePoint library, reviewed via an approval workflow, and only published to Acumatica after approval—ensuring governance and auditability.


How It Works

Step 1 — Upload & Metadata

When a user uploads a file, default metadata is applied automatically:

  • Entity Type (Customer, Vendor, Order, Project, etc.)
  • Entity ID
  • Document Category
  • Status = Draft

Step 2 — Approval Workflow

A Power Automate approval flow handles reviewer assignment, notifications and status changes. Only when the file is Approved does the Publish to Acumatica action become available.

Step 3 — Publish to Acumatica

  1. SPFx extension invokes the Integration API (Azure Function / App Service)
  2. API authenticates with Acumatica (OAuth2 / SSO)
  3. File binary + metadata are posted to Acumatica and attached to the correct entity
  4. SharePoint status updated to Published and audit log saved

Reverse Sync — Get From Acumatica

The extension can also pull attachments from Acumatica to SharePoint. Workflow:

  • Select entity in the UI
  • Click Get From Acumatica
  • Attachments are downloaded to the current folder with mapped metadata

Architecture (High-level)

Key components:

  • SharePoint Online Library — storage, metadata, versioning
  • SPFx Library Extension — UI actions, client logic
  • Power Automate — approval workflows
  • Integration API (Azure) — token handling, Acumatica calls
  • Acumatica REST API — attachments & entity metadata
Figure — SharePoint to Acumatica DMS Integration (high-level)

SPFx Library Extension

The SPFx Library Extension is the core interaction layer embedded directly within the SharePoint document library. It provides contextual actions and communicates with Acumatica in real time.

  • Get From Acumatica – Fetch documents or metadata from Acumatica into SharePoint.
  • Publish to Acumatica – Publish approved files directly to Acumatica using REST APIs.

Authentication is handled using either:

  • Azure AD access token (recommended)
  • Stored Acumatica OAuth token (where required)

Power Automate

Power Automate is intentionally kept minimal and focused only on business approvals.

  • Used exclusively for approval workflows
  • No publishing or integration logic

Once the approval is completed:

  • File status is updated to Approved
  • The Publish to Acumatica action becomes available in the SPFx extension

Azure Function (Optional)

An Azure Function can be introduced if additional security or backend validation is required.

Typical use cases include:

  • IP-restricted Acumatica environments
  • Backend token handling
  • Additional validation or logging

If Acumatica allows direct client-to-API communication, this layer can be skipped.


End-to-End Flow

The overall document flow is simple, auditable, and approval-driven:

  1. User uploads a document to the SharePoint Library
  2. Approval workflow runs via Power Automate
  3. After approval, SPFx Extension enables publishing
  4. SPFx Extension calls Acumatica REST API (directly or via Azure Function)

User → SharePoint Library → SPFx Extension → (Optional Azure Function) → Acumatica REST API



Business Benefits

  • Governance: Only approved documents reach ERP.
  • Consistency: Metadata normalization for better search & reporting.
  • Auditability: Version history, approver details and workflow logs.
  • Process Control: Centralized ingestion point for all company uploads.
  • Compliance: Documents validated before ERP consumption.
  • Clear separation of concerns
  • Secure and governed document publishing
  • No unnecessary backend dependency
  • Better user experience within SharePoint

Common Use Cases

  • Invoice and Finance document validation before publish
  • Purchase / Sales attachments (POs, Delivery Notes)
  • QC Reports and Certificates—approved prior to upload
  • Vendor and Customer contract lifecycle management
  • Project documentation and technical drawings

Implementation Notes

  • Security: Keep credentials & tokens in a secure server-side store. Do not store refresh tokens in browser localStorage.
  • API: Integration API should handle retries, throttling and token refresh.
  • UX: Display publish status and last-synced timestamp on the file card.
  • Audit: Log every publish and retrieval action with user context for compliance.

Conclusion

Making SharePoint the document gateway for Acumatica provides strong governance, better collaboration, and a single controlled ingestion point. By using SPFx library extensions, Power Automate approval workflows, and a secure integration API, organizations ensure only validated, metadata-rich documents enter the ERP—reducing errors and improving compliance.


Part 2 - SharePoint DMS -> Acumatica Files Integration

Part 3 - Acumatica Entity -> SharePoint List/Pages Integration