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:
- Open SharePoint Setup
- Click the Connect button
- Complete the authentication flow
- 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:
- Open a record with a table mapping (e.g., Customer Card)
- Look for the SharePoint FactBox
- 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
- Go to SharePoint Setup
- Click Connect and complete authentication
- 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
- In SharePoint Setup, click Connect (or re-connect)
- Complete authentication flow
- Return to Business Central
- 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
- Open a Customer (or other mapped record)
- In the SharePoint FactBox, click Upload
- Select a small test file
- 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
- With a file in the FactBox, click on it
- File should open in browser or SharePoint
- 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
- Open a record that doesn't have a folder yet
- Attempt to browse or upload a file (the folder is created automatically)
- 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
- Configure Adobe Sign settings
- Click Connect in Adobe Setup
- Verify authentication succeeds
- Send a test document for signature
DocuSign Test
- Configure DocuSign settings
- Click Connect in DocuSign Setup
- Verify authentication succeeds
- Send a test document for signature
Testing Auto-Upload (If Configured)
Test Auto-Upload
- Enable auto-upload for sales documents
- Create and post a test sales invoice
- Verify PDF is uploaded to SharePoint
- 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
- Read the error message - Usually indicates the issue
- Check configuration - Verify all settings are correct
- Test in SharePoint - Can you access the same location directly?
- Check permissions - Both BC and SharePoint
- 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
- Configure in sandbox/test environment
- Complete all tests
- Document settings
- 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:
- Have a test user try the connector
- Get feedback on usability
- Verify all needed features work
- Document any training needs