SharePoint Connector Documentation
Index

Testing the Connection

After configuring the SharePoint Connector, you should test the connection to ensure everything is working correctly. This page covers testing procedures and how to interpret results.

Testing from SharePoint Setup

Using the Connect Button

The simplest way to test your connection:

  1. Open SharePoint Setup
  2. Click the Connect button
  3. Complete the authentication flow
  4. The connection status indicator will show the result

Expected Results

Result Meaning
Connection status changes to "Connected to SharePoint" Configuration is correct
Error message Something needs to be fixed

What Connecting Validates

When you connect, the connector:

  • Checks that the Base URL and Document Library (base folder) fields are filled in (it does not probe the Base URL for reachability), then starts the OAuth flow
  • Completes authentication via your chosen Microsoft Login Method
  • Obtains and stores access and refresh tokens
  • Updates the connection status indicator

Testing from a Record

Functional Testing

Test the complete workflow from a mapped record:

  1. Open a record with a table mapping (e.g., Customer Card)
  2. Look for the SharePoint FactBox
  3. The FactBox should display folder contents

FactBox Indicators

FactBox State Meaning
Shows files/folders Connection working
Empty (no folder yet) May be normal for new records
Error message Connection or permission issue
FactBox not visible No mapping or permissions issue

Step-by-Step Testing Process

Test 1: Basic Connection

  1. Go to SharePoint Setup
  2. Click Connect and complete authentication
  3. Verify connection status shows "Connected to SharePoint"

If test fails:

  • Check Base URL spelling
  • Verify Subsite Name (if used)
  • Check the Document Library (base folder) path
  • Verify authentication settings

Test 2: Authentication

  1. In SharePoint Setup, click Connect (or re-connect)
  2. Complete authentication flow
  3. Return to Business Central
  4. Verify the connection status shows "Connected to SharePoint"

If authentication fails:

  • Verify Client Id and Client Secret Value (for App Registration)
  • Check redirect URI matches exactly
  • Ensure consent has been granted
  • Try PKCE with a blank Client Id, or Device Code, for simpler testing (no app registration of your own)

Test 3: File Operations

  1. Open a Customer (or other mapped record)
  2. In the SharePoint FactBox, click Upload
  3. Select a small test file
  4. Verify file appears in the FactBox

If upload fails:

  • Check SharePoint write permissions
  • Verify folder path is valid
  • Check for path character issues

Test 4: Download/Open

  1. With a file in the FactBox, click on it
  2. File should open in browser or SharePoint
  3. Verify you can view the content

If download fails:

  • Check SharePoint read permissions
  • Verify file URL is correct
  • Check browser popup settings

Test 5: Folder Creation

  1. Open a record that doesn't have a folder yet
  2. Attempt to browse or upload a file (the folder is created automatically)
  3. Verify folder appears in SharePoint

If folder creation fails:

  • Check SharePoint permissions for creating folders
  • Verify base folder path is valid
  • Check for invalid characters in folder name

Testing E-Signing (If Configured)

Adobe Sign Test

  1. Configure Adobe Sign settings
  2. Click Connect in Adobe Setup
  3. Verify authentication succeeds
  4. Send a test document for signature

DocuSign Test

  1. Configure DocuSign settings
  2. Click Connect in DocuSign Setup
  3. Verify authentication succeeds
  4. Send a test document for signature

Testing Auto-Upload (If Configured)

Test Auto-Upload

  1. Enable auto-upload for sales documents
  2. Create and post a test sales invoice
  3. Verify PDF is uploaded to SharePoint
  4. Check the customer's SharePoint folder

Check if using Background processing:

  • The upload happens via a background session (StartSession)
  • If the background session fails, it falls back to foreground processing
  • Enable Debug Mode in setup for detailed error information

Common Test Scenarios and Results

Scenario Matrix

Test Expected Result If Fails
Connect Status shows Connected Check configuration
FactBox loads Shows folder or empty state Check mapping
Upload file File appears in list Check permissions
Open file File opens in browser Check browser settings
Create folder Folder visible in SharePoint Check SP permissions
Auto-upload PDF appears after posting Check Report Selections

Interpreting Error Messages

Common Error Messages

These are typical SharePoint REST server responses surfaced by the connector -- they come from SharePoint itself, not from the connector's own Label strings, so exact wording may vary by tenant.

Error Likely Cause Solution
"Server relative urls must start with SPWeb" Document Library (base folder) includes a site path (e.g., sites/...) Put sites/... in Subsite Name; keep the Document Library (base folder) as a library name only
"Access denied. You do not have permission ..." Permission issue Verify SharePoint permissions for the authenticating user
Site / subsite not found Incorrect Subsite Name or Base URL Re-check Base URL (must end with sharepoint.com) and Subsite Name (no leading slash)
Folder path not found Path does not exist or is misspelled Verify the Document Library (base folder) and any per-mapping override
Token-related failures Refresh token expired or revoked Click Connect on SharePoint Setup to re-authenticate

Error Resolution Steps

  1. Read the error message - Usually indicates the issue
  2. Check configuration - Verify all settings are correct
  3. Test in SharePoint - Can you access the same location directly?
  4. Check permissions - Both BC and SharePoint
  5. Try simpler settings - Remove Subsite Name, use default folder

Verification Checklist

After testing, verify each item:

Item Test Method Expected Result
Setup connection Connect button Success
Authentication Connect button No errors
FactBox appears Open mapped record FactBox visible
View files Look at FactBox Files display
Upload file Upload test file File appears
Open file Click file Opens correctly
Navigate folders Click folder Navigation works
Create folder Upload triggers auto-creation Folder created

Testing Best Practices

Test Environment First

  1. Configure in sandbox/test environment
  2. Complete all tests
  3. Document settings
  4. Replicate in production

Document Test Results

Keep a record of:

Item Value
Test date When you tested
Configuration Settings used
Tests performed What you tested
Results Pass/fail for each
Issues found Any problems
Resolution How you fixed them

User Acceptance Testing

Before rollout:

  1. Have a test user try the connector
  2. Get feedback on usability
  3. Verify all needed features work
  4. Document any training needs