Connection and Authentication Errors
This page helps you troubleshoot connection and authentication issues with the SharePoint Connector.
Common Connection Errors
Error: Connection Failed
Symptoms:
- "Connection failed" message
- Unable to connect to SharePoint
- Connection attempt fails
Possible Causes and Solutions:
| Cause | Solution |
|---|---|
| Incorrect Base URL | Verify URL format (must end with sharepoint.com) |
| Network issue | Check internet connectivity |
| SharePoint down | Verify SharePoint is accessible |
| Firewall blocking | Allow SharePoint URLs |
Error: Access Denied
Symptoms:
- "Access denied" or "403 Forbidden"
- Can connect but can't access folders
Possible Causes and Solutions:
| Cause | Solution |
|---|---|
| Insufficient permissions | Grant SharePoint permissions |
| Wrong site | Verify Subsite Name setting |
| Folder doesn't exist | Create the folder in SharePoint |
Error: Site Not Found
Symptoms:
- "Site not found" or "404"
- URL appears correct
Possible Causes and Solutions:
| Cause | Solution |
|---|---|
| Subsite Name has leading slash | Remove leading / (use sites/BCDocs not /sites/BCDocs) |
| Subsite Name incorrect | Verify format: sites/name, teams/name, or just name for root subsites |
| Site doesn't exist | Verify site exists in SharePoint |
| Typo in URL | Review all URL components |
Subsite Name Format Examples:
| Correct | Incorrect |
|---|---|
sites/BCDocs |
/sites/BCDocs |
teams/BCDocs |
/teams/BCDocs |
BCDocs |
/BCDocs |
Authentication Errors
Error: Authentication Failed
Symptoms:
- Can't authenticate
- OAuth errors
- "AADSTS" error codes
Possible Causes and Solutions:
| Cause | Solution |
|---|---|
| Wrong credentials | Verify Client Id and Client Secret Value |
| Expired secret | Generate new client secret (App Registration, Modern App Registration) |
| Missing consent | Grant admin consent |
| Wrong tenant | Verify you're in correct tenant |
| Single-tenant app registration, Entra Tenant Id blank (PKCE, Modern App Registration) | Fill in Entra Tenant Id (AADSTS50194) |
| Pop-up blocked (PKCE, Modern App Registration, App Registration) | Allow pop-ups for Business Central, or click Sign in on the PKCE sign-in page |
Error: Token Expired
Symptoms:
- Was working, now fails
- "Token expired" message
Solutions:
- Click "Connect" to re-authenticate
- For personal auth, user must reconnect
- Check if refresh token is still valid
Error: Invalid Client
Symptoms:
- "AADSTS700016" or similar
- "Invalid client" message
Possible Causes and Solutions:
| Cause | Solution |
|---|---|
| Wrong Client ID | Copy correct ID from Azure |
| App deleted | Recreate app registration |
| Wrong tenant | Verify app is in your tenant |
Error: Redirect URI Mismatch
Symptoms:
- "AADSTS50011"
- "Reply URL does not match"
Solution:
- Go to Azure AD app registration
- Check redirect URIs
- Ensure exact match with BC Callback URL
- App Registration: include the
page=70319501parameter. Modern App Registration and PKCE: use theOAuthLanding.htmpage shown as Callback URL
Error: Redirect URL Registered Under the Wrong Platform (PKCE)
Symptoms:
- "The redirect URL ... is registered under the wrong platform on the App Registration ..."
- "AADSTS7000218" or "AADSTS9002327"
Cause: PKCE is used with your own app registration (Client Id filled in), and its redirect URI is registered under Web (which requires a client secret) or Single-page application.
Solution:
- In the app registration, open Authentication
- Remove the
OAuthLanding.htmURL from the Web and Single-page application platforms - Add it under Mobile and desktop applications (custom redirect URI)
- Set Allow public client flows to Yes
- Or clear Client Id to use the connector's app registration
Error: Sign-In Not Completed
Symptoms:
- PKCE: the sign-in page closes, or "The sign-in response does not belong to this sign-in (state mismatch), please try again."
- PKCE: "The sign-in failed: ..." followed by the error from Microsoft Entra
- Modern App Registration: "The sign-in was not completed."
Solution:
- Close all open Microsoft sign-in windows
- Click Connect again and finish the sign-in in the new window
- For "The sign-in failed", look up the AADSTS code in the message (see the table below)
Error: No Refresh Token
Symptoms:
- "The Microsoft login server did not return a refresh token, the connection cannot be kept without signing in again." (PKCE)
- "The sign-in succeeded, but no refresh token could be read from it and the access token cannot be renewed from the token cache either, ..." (Modern App Registration)
Solution: With your own app registration, make sure the delegated SharePoint permission is consented and that no policy removes offline_access. Then click Connect again. Modern App Registration checks the renewal during Connect, so this error appears right away instead of users being asked to sign in on every page later.
Configuration Errors
Error: Server Relative URLs
Symptoms:
- "Server relative urls must start with SPWeb" (returned by the SharePoint service, not a connector message)
Possible Causes and Solutions:
| Cause | Solution |
|---|---|
| Base Folder format | Don't use full URLs in Base Folder |
| URL encoding | Remove %20 and use spaces |
| Wrong path | Verify folder path format |
Error: Folder Not Found
Symptoms:
- "Folder not found"
- Path seems correct
Possible Causes and Solutions:
| Cause | Solution |
|---|---|
| Folder doesn't exist | Create folder in SharePoint |
| Path format wrong | Check for leading slashes |
| Different site | Verify you're looking at right site |
Error: Invalid Path Characters
Symptoms:
- Upload fails
- Folder creation fails
Solutions:
- Check folder/file names for special characters
- Enable "Strict" name sanitizing
- Remove problematic characters from names
Network and Connectivity
Timeout Errors
Symptoms:
- Operations timeout
- Slow responses
- Intermittent failures
Solutions:
| Action | How |
|---|---|
| Check network | Test SharePoint directly |
| Reduce batch size | For bulk operations |
| Check proxy | If using proxy server |
| Off-peak hours | Try during low usage |
Firewall Issues
Required Endpoints:
| Endpoint | Purpose |
|---|---|
| *.sharepoint.com | SharePoint REST API |
| login.microsoftonline.com | OAuth (Public cloud) |
| login.microsoftonline.us | OAuth (US Government cloud) |
| check.hougaardlicense.com | License validation (production only) |
Ensure outbound HTTPS (443) is allowed.
Diagnostic Steps
Step 1: Verify Connection
- Open SharePoint Setup
- Attempt to connect or browse SharePoint
- Note any error message
Step 2: Test SharePoint Directly
- Open browser
- Navigate to SharePoint URL
- Verify you can access the site
- Try the Base Folder path
Step 3: Check Azure AD
- Go to Azure portal
- Find your app registration
- Verify settings match BC
- Check for expired secrets
Step 4: Review Permissions
- Check API permissions granted
- Verify admin consent
- Check SharePoint site permissions
Error Message Reference
AADSTS Error Codes
| Code | Meaning | Solution |
|---|---|---|
| AADSTS50011 | Redirect mismatch | Fix redirect URI |
| AADSTS65001 | Consent required | Grant admin consent |
| AADSTS70011 | Invalid scope | Check permissions |
| AADSTS700016 | App not found | Verify Client ID |
| AADSTS700027 | Client assertion failed (Certificate) | Upload the current certificate to the app registration |
| AADSTS50194 | Single-tenant app signed in through the common endpoint | Fill in Entra Tenant Id (PKCE, Modern App Registration) |
| AADSTS7000218 | Client secret expected (PKCE with a Web redirect URI) | Register the redirect URI under Mobile and desktop applications |
| AADSTS9002327 | Single-page application redirect URI (PKCE) | Register the redirect URI under Mobile and desktop applications |
SharePoint Errors
| Error | Meaning | Solution |
|---|---|---|
| 401 Unauthorized | Auth failed | Re-authenticate |
| 403 Forbidden | No permission | Grant access |
| 404 Not Found | Path wrong | Check URL/path |
| 429 Too Many Requests | Rate limited | Slow down |
Resolution Checklist
Quick Checks
- Base URL ends with sharepoint.com
- Subsite Name has no leading slash
- Base Folder has no URL encoding
- Client ID is correct GUID
- Client Secret Value is the value (not ID)
- Callback URL matches Azure exactly
- Admin consent granted
If Still Failing
- Reset connection in SharePoint Setup
- Re-enter credentials
- Reconnect
- Test again
Getting Help
If issues persist:
- Document the error message
- Note when it started
- Record what changed recently
- Contact support with details