SharePoint Connector Documentation
Index

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:

  1. Click "Connect" to re-authenticate
  2. For personal auth, user must reconnect
  3. 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:

  1. Go to Azure AD app registration
  2. Check redirect URIs
  3. Ensure exact match with BC Callback URL
  4. App Registration: include the page=70319501 parameter. Modern App Registration and PKCE: use the OAuthLanding.htm page 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:

  1. In the app registration, open Authentication
  2. Remove the OAuthLanding.htm URL from the Web and Single-page application platforms
  3. Add it under Mobile and desktop applications (custom redirect URI)
  4. Set Allow public client flows to Yes
  5. 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:

  1. Close all open Microsoft sign-in windows
  2. Click Connect again and finish the sign-in in the new window
  3. 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:

  1. Check folder/file names for special characters
  2. Enable "Strict" name sanitizing
  3. 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

  1. Open SharePoint Setup
  2. Attempt to connect or browse SharePoint
  3. Note any error message

Step 2: Test SharePoint Directly

  1. Open browser
  2. Navigate to SharePoint URL
  3. Verify you can access the site
  4. Try the Base Folder path

Step 3: Check Azure AD

  1. Go to Azure portal
  2. Find your app registration
  3. Verify settings match BC
  4. Check for expired secrets

Step 4: Review Permissions

  1. Check API permissions granted
  2. Verify admin consent
  3. 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

  1. Reset connection in SharePoint Setup
  2. Re-enter credentials
  3. Reconnect
  4. Test again

Getting Help

If issues persist:

  1. Document the error message
  2. Note when it started
  3. Record what changed recently
  4. Contact support with details