Troubleshooting SharePoint Web Connections and Services

Liz Sanderson
Liz Sanderson
  • Updated

Introduction

Are you encountering issues connecting to SharePoint in FME? This article contains troubleshooting and common issues encountered when configuring a SharePoint web service definition and connection for both Form and Flow.

If you have not already, please ensure that you have followed all the steps in the How to Create a SharePoint Web Connection section of the Getting Started with Microsoft SharePoint article for your product and tenancy. This is often the first time many users encounter Azure App Registrations. Once the app has been registered with Microsoft Azure, the information needs to be carefully added to the FME web service definition so it can be used for OAuth 2.0. 

Please ensure you’ve correctly configured the Azure app registration and web service by reviewing the Initial Troubleshooting.

If you’re confident everything is set up correctly and you’re still experiencing issues, look through the Common Issues. If your issue isn’t listed, refer to the Additional Troubleshooting Tips to help narrow down the cause of the issue (and hopefully find a fix!).

Content Overview

Initial Troubleshooting

If you are using the SharePoint Online Connector, SharePoint Online List Reader/Writer, or Browsing SharePoint as a file system:

  1. Make sure that you have upgraded the package to the latest version.
  2. If you have upgraded, create a new web service and connection. See the list of connection articles.
  3. Create a test workspace with only the SharePoint Online Connector and see if it succeeds

Here are some steps that get overlooked when configuring the Azure App Registration and FME web service. These steps are all covered in detail in the How to Create a SharePoint Web Connection articles.

Tenancy

Microsoft offers both single-tenant and multi-tenant applications, and the configuration for each is slightly different. If your application is single tenant, the URLs in FME’s web service definition should have /common/ in them. If the application is single-tenant, you should include the directory (tenant) ID in the URL instead.

For more information, see Microsoft’s documentation on Tenancy in Azure Active Directory.

Client Secret

Microsoft requires a client secret for confidential web apps, which means this is required for FME Flow. A client secret is also required if connecting to SharePoint using Application Permissions in FME Form. Otherwise, the client secret should not be used in FME Form, which is a native app. If you’re working in FME Form, then ensure that 'Note Required' is checked next to Client Secret in the web service definition; otherwise, you may receive a 401 error from SharePoint.

If you’re publishing the web connection to FME Flow, ensure you copy the client secret from Azure and add it to the web service in FME Flow only. Ensure you’re copying the secret value, not the secret ID. See Web Connections - FME Flow documentation.

API Permissions

Make sure you’ve chosen the right permissions in Azure for FME for your FME web service. 

  • The SharePoint Legacy List Reader/Writer uses the legacy SharePoint API. 
  • The SharePoint Online Connector, SharePoint Online List Reader/Writer, and Browsing SharePoint Online as a file system use the Microsoft Graph API and will need those permissions

In FME, as long as the auth URL in the web service definition uses the .default scope and the correct permissions have been given in Azure, there should be no issues.

Please follow the appropriate SharePoint article listed in the Getting Started with Microsoft SharePoint article to understand what permissions are needed for each scenario.

Redirect URI and Platform

The redirect URI must match between what is configured in FME and in the Azure app registration. If this does not match, you will receive an error when testing or authorizing the web connection. In addition, the redirect URI must be added to the correct platform under Authentication in the Azure App Registration. For FME Form, the platform is 'Mobile and Desktop Applications'. For FME Flow, the platform is 'Web'.  

FME Flow must be configured for HTTPS, and the redirect URI will be: https://myfmeflow.mydomain.com/fmeoauth

Review FME Flow Logs

If you are trying to get the connection working on FME Flow, review the logs for errors or warnings. The OAuth log can be found under Resources > Logs > Service > Current > fmeoauth.log. Job logs and the fmeserver.log file can also be helpful.

Common Issues

Admin consent required

If your Azure portal requires admin consent, you will receive an Approval Required message when trying to authorize the SharePoint connection. Ask your Azure Administrator to grant admin consent to the app registration's API permissions, then retry the test in FME. Authorizing with an Azure Administrator account should also resolve the issue.

Depending on your organization's Azure consent workflow, you may be permitted to request approval via Microsoft's dialogs when testing your web connection or web service. The Azure administrator can then approve the request. 

If you continue to be prompted for consent after approval in Azure, check the &prompt parameter in your web service's Authorization Parameters URL. Try &prompt=select_account and retry. Or, you may need to remove the &prompt= parameter entirely. This will depend on your organization's configuration.

In the Microsoft Graph API authorization URL, the "prompt" parameter specifies whether the user should be prompted to sign in or consent to the requested permissions. See Microsoft Graph OAuth2 Request Parameters.

Invalid audience

In the context of a Microsoft Graph application's OAuth2 authentication flow, an "audience" refers to the target resource or service that the access token will be used to access.

When an application requests an access token from Microsoft Graph, the application specifies the "audience" parameter in the authentication request. The value of this parameter should be set to the App ID URI of the target resource or service that the application wants to access with the access token.

For example, if an application wants to access a user's OneDrive files, it would set the "audience" parameter to "https://graph.microsoft.com". This tells Microsoft Graph to issue an access token that is intended for use with the Microsoft Graph API.

When the application sends a request to the Microsoft Graph API, it includes the access token in the request's Authorization header. The "audience" parameter in the access token should match the value that was specified in the authentication request. If the "audience" parameter in the access token doesn't match the intended resource, the request will be rejected.

In summary, the "audience" parameter in the Microsoft Graph OAuth2 authentication flow indicates the intended resource or service the access token will be used to access.

If using one app registration for both SharePoint Online Connector and SharePoint Legacy List Reader/Writer, ensure that the scope in the FME web service authorization URL is scope=https://[TENANT].sharepoint.com/.default offline_access or create two separate apps in Azure, and fix the scope in the authorization URL in the web service definition: scope=offline_access sites.readwrite.all etc

Code Parameter not Specified

If you see the error "code parameter not specified" when you try to connect, it is likely the result of an incorrect or malformed URL in the SharePoint web service configuration. Most likely the Retrieve Token Parameters URL. Make sure that the URL is correct for the tenancy specified in your Azure App Registration. Try recreating the web service from the template provided.

Delegated vs Application Permissions

FME supports Microsoft Azure delegated permissions for all SharePoint connections. Microsoft Azure application permissions are not supported for the SharePoint Legacy List Reader/Writer. To learn more about the difference, please read Getting Started with Microsoft SharePoint.

The permissions you choose will determine which web service you need to configure in FME. Ensure you have followed the correct article from Getting Started with Microsoft SharePoint.

API Permissions: Sites.Selected

If you are using the Sites.Selected API permission in your Azure app registration, you can expect an "Access Denied" message when clicking the ellipsis for the Site parameters in the SharePointOnlineConnector or SharePoint Online List Reader/Writer.

When selecting the ellipsis to the right of the Site parameter, a "search for sites" call is made, as described in this Microsoft Graph API Documentation. However, as noted in the Permissions section, this method does not support the Sites.Selected application permission.

To resolve this issue:

In the SharePointOnlineConnector: 

  • Open the Advanced Selection Editor for the Site parameter
  • For the Object Identifier, hard-code <HostURL>,<siteID>,<webId> with your values. Remove the angled brackets and ensure the values are separated by a single comma with no spaces.

In the SharePoint Online List Reader/Writer:

  • Open the Text Editor for the Site parameter
  • Hard-code the <HostURL>,<siteID>,<webId> with your values. Remove the angled brackets and ensure the values are separated by a single comma with no spaces.

If you still see an Access Denied message after completing the steps above, you may need to register a new Azure App, especially if your current app was created some time ago.

Please note that both the Sites.Selected application and delegated Graph API permissions require additional configuration in Microsoft Azure that is not required for other Graph API permissions. The Azure app registration must be granted access to each SharePoint site. Safe cannot provide detailed instructions on configuring the Sites.Selected application or delegated permissions in Azure - please consult with Microsoft. 

400 Bad Request

This error typically means that one of the OAuth2.0 web service URLs is incorrect. Reconfirm that the URLs you have entered in the web service are correct as per the relevant connection article from Getting Started with Microsoft SharePoint.

For example, below is an example error for an incorrect Refresh Token URL:

Connection Storage: Request to update access token failed. (HTTP Error 'HTTP/1.1 400 Bad Request')
Failed to get authorization header.
Python Exception <FMEWSException>: Type: 3, Number: 1, Message: Failed to get authorization header."

If the connection initially authenticates successfully, but you then begin receiving the 400 error, check your organization's Adaptive Session Lifetime Policies in Microsoft Azure, specifically Policy 1: Sign-in frequency control. This policy sets reauthentication requirements for users and apps. If your organization cannot change this, consider using Application Permissions instead. 

401 Unauthorized or Failed to Obtain Refresh Token

If your FME web service is an OAuth2.0 web service that uses the OAuth2.0 authorization code grant flow, then FME Form must not send a client secret to Microsoft. See Getting Started with Microsoft SharePoint for more details. You can do this by clicking the 'Not Required' checkbox next to the client secret parameter in the FME Form web service definition. 

Actions outside of FME may also cause a refresh token to be revoked. Please see Microsoft's documentation on refresh tokens. 

403 Client Error: Forbidden for URL.

You are able to authorize your connection successfully, but receive an error like the one below when a workspace is run:

Client-side error: '403 Client Error: Forbidden for url: https://mysite.sharepoint.com/sites/_api/web/Lists?%24select=Title%2CId&%24filter=Hidden+eq+false' returned from SharePoint. Error message was: 'Attempted to perform an unauthorized operation.' 

Make sure that the Microsoft account you authorized the web connection with has the necessary access to the SharePoint site hosting the list or library. 

Redirect URI

 

If you see this error message, it typically means the redirect URI in the FME SharePoint Web Service does not match the redirect URIs listed in the Authentication tab of the Azure app.

Please ensure the redirect URI from your SharePoint Web Service in FME is listed in the Azure app and that the platform type is set to "Mobile and Desktop applications".

If you have enabled FME Flow Connection Storage in FME Form, you will need to configure the web platform with a redirect URI of http://<yourFMEFlowURL>/fmeoauth and create a client secret in your Azure app registration, as described in Part 1 of How to Create a SharePoint Single Tenant Web Connection for FME Flow and How to Create a SharePoint Online Multitenant Web Connection for FME Flow.

Certificate Verify Failed: Certificate has Expired

You may receive this error in FME on some machines, but not others, when trying to connect to SharePoint. This is often due to an expired intermediate SSL certificate that may be included with Windows. In Windows:

  • Open Windows Certificate Manager (Run > certmgr.msc)
  • Expand the Intermediate Certification Authorities node and click on Certificates
  • In the list of certificates, look for the DigiCert SHA2 Secure Server certificate
  • If you see the expired DigiCert SHA2 Secure Server intermediate certificate in the list, disable it: right-click the certificate > Properties> General tab > Disable all purposes
  • Save the change and close Windows Certificate Manager
  • Restart FME and retry the connection

Different Lists Returned in FME Compared to SharePoint in Web Browser

If different lists are returned in FME compared to what is returned in the browser, verify in MS Graph Explorer that the API is returning the correct list. When you access MS Graph Explorer, ensure you sign in (top right) with the same account used in the SharePoint web connection.

In the left-hand navigator of Graph Explorer, you can expand SharePoint queries for sites, lists, etc.
If the Graph API is not returning the expected information, then FME will also not be able to access it, as it uses the Graph API.

Intermittently Cannot Connect to SharePoint from FME Flow

When an OAuth2.0 web connection (using delegated permissions) is published to FME Flow, it also publishes the current (normally) working authorization token. After a period determined by Microsoft (an hour, month, etc) this token will expire and if FME Flow has not been configured properly for the web service it will be unable to refresh the token.

After a web connection and its web service have been published to FME Flow, the user will need to:

  • Ensure the app registration in Azure has a web platform configured.
  • Specify the correct redirect URI in the web platform (https://<host>:<port>/fmeoauth).
  • Generate a client secret and add this to the web service in FME Flow
  • Ensure the client_secret=[CLIENT_SECRET] parameter has been added to the Refresh Token Parameters in the web service. Note that this can only be set in FME Form and must then be published to FME Flow.

Note that this is not required when using a web connection with application permissions, as a new access token is obtained on every connection. Please see Getting Started with Microsoft SharePoint for more information.

OSError

If you are trying to read Excel files from SharePoint but receive the following error: 

OSError: [WinError 10093] Either the application has not called WSAStartup, or WSAStartup failed

This issue has affected some customers using FME versions 2024 and 2025. There are a few ways to resolve this issue. 

First, update the SharePoint Online Connector to version 1.2.1 or later. To do this, select Tools or Utilities > FME Options > FME Packages > Select the SharePoint Online package > Select Check for updates > click Update. 

If updating the SharePoint Online Connector package does not resolve the issue, consider upgrading to FME 2026.1 or later, or try the following workaround in FME 2024 or 2025.

Workaround: Add a SharePointOnlineConnector to the canvas, connect it to the same Creator (or transformer) that connects to the FeatureReader used to read the Excel file from SharePoint, and try reading that Excel file again. 

SyntaxWarning at First Use of the SharePointOnlineConnector Transformer

If you have installed version 1.2.1 or version 1.2.2 of the SharePoint Online package, you may encounter the following SyntaxWarning in translation / job logs while configuring or running the SharePointOnlineConnector for the first time after package install:

C:\Users\xxx\AppData\Roaming\Safe Software\FME\Packages\24783-win64\python\safe.microsoft-sharepoint\stringcase.py:247: SyntaxWarning: invalid escape sequence '\W'
return re.sub("\W+", "", string)

If you encounter this warning but the SharePointOnlineConnector still produces the expected results when run, you can safely ignore it. This warning is often only thrown the first time v1.2.1 or v1.2.2 of the connector is configured or run. Configuring or running affected connectors a second time may stop the warning from occurring.

If the warning persists, or it causes unexpected results/errors with the affected SharePointOnlineConnector transformer, try upgrading your SharePoint Online package to, at minimum, version 1.4.0. Also upgrade any SharePointOnlineConnector transformers in your workflow after upgrading the package. Instructions for upgrading (updating) an FME Package can be found in the FME Support article Introduction to FME Packages.

If the warning still persists after upgrading the SharePoint Online package and all SharePointOnlineConnector transformers in your workflow, please contact Safe Support for further guidance.

Additional Troubleshooting Tips

Azure Error Messages

Azure error messages are normally descriptive, and it will be clear what the issue is. For example:

Invalid Resource. The client has requested access to a resource which is not listed in the requested permissions in the client’s application registration.

This means FME is trying to access resources it doesn’t have permission to access. This needs to be fixed in the Azure App Registration.

Another example:

The reply URL specified in the request does not match the reply URLs configured for the application.

The reply URL is not the same as the redirect URI. You need to verify that FME and Azure have the exact same redirect URI in their configurations.

If you’re unsure what an Azure error message refers to, there are usually many questions and answers on the Azure Community or other online tech support forums.

HTTP Error Codes

If the web service can't authenticate successfully, you will probably see HTTP Error codes returned. If you’re not sure what an error code means, you can check here: HTTP response status codes
For example, a 401 response means the user/client is unauthorized.
You will want to check everything relating to authentication and authorization: user account sign-in, Client ID, Client Secret, permissions, etc.

Fiddler (or other network monitoring tools)

If you don't get any useful error messages back in FME, use Fiddler to intercept the network traffic and responses coming from Microsoft.

When Fiddler is open, it will capture all traffic from your computer. Filter the processes to only show traffic from FME.

If you don’t see any traffic from FME, in FME Options > Network Proxy, select Use system proxy settings.
​​​​​​

Was this article helpful?

We're sorry to hear that.

Please tell us why.