Contact Free trial Login

Microsoft SharePoint Connector


The Microsoft SharePoint connector provides support for both SharePoint 2013 and SharePoint Online for use in the cloud and on-premises. This connector enables content and document management, access to intranet and extranet portals and websites, collaboration, and enterprise search. This connector also enables integration with SharePoint through its REST API.


This document assumes that you are familiar with SharePoint, Mule, Anypoint Connectors, Anypoint Studio, Mule concepts, elements in a Mule flow, and Global Elements.

You need login credentials to test your connection to your target resource.

For hardware and software requirements and compatibility information, see the Connector Release Notes.

To use this connector with Maven, view the pom.xml dependency information in the Dependency Snippets in Anypoint Exchange.

What’s New in this Connector

In Mule 4 SharePoint Online and SharePoint OnPremise were merged into one connector that includes all functionalities from both previous connectors.

To Connect in Design Center

  1. Click a trigger. You can create a global element by selecting this connector as they trigger. If a global element is not needed, you can use an HTTP Listener or Scheduler trigger.

  2. To create an optional global element for the connector, set these fields:

    Global Element for the Connector
  3. Required Parameters Online Configuration.

  4. Okta Authentication.

  5. Select the plus sign to add a component.

  6. Select the connector as a component.

Required Parameters Online Configuration

Online Configuration
  • Username: Enter the SharePoint username.

  • Password: Enter the corresponding password.

  • Site URL: Enter the corresponding site URL.

Okta Authentication

Okta Authentication Configuration

Configuring the connector to use Okta authentication requires the following information:

  • Okta Domain: The Okta endpoint that accepts the Okta username and password for authentication, for example:

  • Okta Username: Your Okta username, for example:

  • Okta Password: Your Okta password.

  • Okta API Token: Okta uses a bearer token for API authentication with a sliding scale expiration, for example:

  • SharePoint Online Embedded Link: The link of your Microsoft Office 365 SharePoint Online application from Okta, for example:

About Connector Terminology

  • Actions - Operations that allow side effects, such as data modification, and cannot be further composed to avoid non-deterministic behavior.

  • Complex types - Keyless named structured types consisting of a set of properties. Complex types are commonly used as property values in model entities, or as parameters or return values for operations.

  • Entities - Instances of entity types, for example, an account or an opportunity.

  • Entity sets - Named collections of entities, for example, an account is an entity set containing account entities. An entity’s key uniquely identifies the entity within an entity set.

  • Entity types - Named structured types with a key. Entity types define the named properties and relationships of an entity, and may derive by single inheritance from other entity types.

  • Enumeration types or Enum types - Named primitive types whose values are named constants with underlying integer values.

  • Functions - Operations that do not have side effects and may support further composition, for example, with additional filter operations, functions, or an action.

Connect in Anypoint Studio 7

You can use this connector in Anypoint Studio by first downloading it from Exchange and configuring it as needed.

Install Connector in Studio

  1. In Anypoint Studio, click the Exchange icon in the Studio task bar.

  2. Click Login in Anypoint Exchange.

  3. Search for this connector and click Install.

  4. Follow the prompts to install this connector.

When Studio has an update, a message displays in the lower right corner, which you can click to install the update.

To Configure Your First Flow

To configure:

  1. In Anypoint Studio, click File > New > Mule Project.

  2. Specify a Project Name and click Finish.

  3. Click the Global Elements tab.

  4. Click Create.

  5. Search for sharepoint.

  6. Click Microsoft SharePoint and click OK.

  7. Choose the Global Type to configure:

    Global Types
  8. Click Test Connection to ensure the connection works correctly:

    Global Element Properties

To Create an Anypoint Studio Flow

To create an Anypoint Studio flow:

  1. From Anypoint Studio, click File > New > Mule Project.

  2. Specify a Project Name and click Finish.

  3. Search for http and drag an HTTP connector to the canvas.

  4. Search for sharepoint and drag a Microsoft SharePoint connector next to the HTTP connector.

    Studio Visual Editor Flow
  5. Double-click the HTTP connector and set Host to, Port to 8081, and Path to fileAdd. Click OK.

  6. Double-click the Microsoft SharePoint connector and click the green plus symbol.

  7. From the Connector Configuration list, click the Microsoft SharePoint configuration that was previously created.

  8. From the Operation list, click File Add.

    Set these fields:

    Studio Visual Editor Fields
    • File server relative URL: The path and file name in SharePoint of where to create the file.

    • File content stream: The content of the file to be created.

To Run a Flow

  1. In Package Explorer, right click your project’s name, and click Run As > Mule Application.

  2. Check the console to see when the application starts. You should see messages such as these if no errors occur:

    INFO  2018-01-14 22:12:42,003 [main] org.mule.module.launcher.DeploymentDirectoryWatcher:
    + Mule is up and kicking (every 5000ms)                    +
    INFO  2018-01-14 22:12:42,006 [main] org.mule.module.launcher.StartupSummaryDeploymentListener:
    *  - - + DOMAIN + - -               * - - + STATUS + - - *
    * default                           * DEPLOYED           *
    * - - + APPLICATION + - -   * - - + DOMAIN + - -  * - - + STATUS + - - *
    * myapp                     * default             * DEPLOYED           *

Example: SharePoint Connector

This example demonstrates the use of Microsoft SharePoint Connector.

To build and run this demo project, you need:

  • Anypoint Studio with at least the Mule 4.0 Runtime.

  • Microsoft SharePoint Connector v2.0.0 or higher.

To Test the Flow

  1. Import the demo project into your workspace using Anypoint Exchange or using the Import command in the File menu.

  2. Specify your credentials in the /src/main/app/ file:

  3. Run the project in Studio.

  4. Type localhost:8081/demo in your browser to access the selection menu of the demo.

  5. Optionally you can configure the Connection Timeout and Read Timeout. The Connection Timeout is the timeout in making the initial connection with the server. The Read Timeout is the timeout on waiting to read data from the server.

You can use the selection menu from http://localhost:8081 to test the flows or you can POST JSONs using a tool like curl, or any other tool (Chrome/Mozilla Firefox extensions) that lets you POST a body when calling the URL.

About Frequently Asked Questions

  • Which versions of SharePoint are supported by this connector?

    The SharePoint connector supports SharePoint Online on-premises and SharePoint online versions.

  • What authentication schemes are supported by this connector?

    For SharePoint Online, authentication using standard SharePoint online user credentials is supported as well as Okta authentication.

  • What parts of the SharePoint object model are accessible by the connector?

    Specific support for Files and Folders, Lists, ListItems, and Attachments is offered. Additionally, all other entities of the SharePoint API are accessible in JSON form using the ResolveObject and ResolveCollection operations.

  • Are DataSense and DataWeave supported by this connector?

    Yes, all supported entities and entity attributes are exposed to Studio by the connector for use with DataWeave.

  • What operations can I perform with the connector?

    For the Lists and ListItems API, operations include create, retrieve, update, and delete.

    For Files and Folders, operations include add, retrieve content, retrieve metadata, delete, check out, undo check out, check in, publish, unpublish, approve, deny, recycle, and copy.

  • What Mule editions can I use this connector with?

    This connector is supported on any Enterprise Edition Anypoint platform running on any operating system and bit type, including the CloudHub integration PaaS.

  • How do I build a query for a query operation?

    The query operations Folder Query, File Query, and List Item Query only support OData queries.

    For the List Item Query operation, the query has this format: LIST_ID?$select=FIELDS_TO_SELECT&filter=FILTER_PART.

    For example: Vessels?$select=Title,FLAG,SEGMENT,ID,VesselName&$filter=Title eq 1.

    The same format applies to the other query operations.

    To learn more about building queries, see the SharePoint documentation page Use OData query operations in SharePoint REST requests.

Use Case XML

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:ee=""
 <configuration-properties file=""/>
	<http:listener-config name="HTTP_Listener_config" doc:name="HTTP Listener config">
		<http:listener-connection host="localhost" port="8081" />
	<sharepoint:sharepoint-online-config name="SharePoint_SharePoint_online" doc:name="SharePoint SharePoint online">
		<sharepoint:online-connection username="${sharepoint.username}" password="${sharepoint.password}" siteUrl="${sharepoint.siteUrl}" disableCnCheck="${sharepoint.disableCnCheck}" />
	<flow name="UI-PROVIDER">
		<http:listener doc:name="Listener" config-ref="HTTP_Listener_config"
		<parse-template doc:name="Parse Template" location="formInput.html"/>
	<flow name="FILE-ADD_FLOW">
		<http:listener doc:name="Listener" config-ref="HTTP_Listener_config"
		<sharepoint:file-add doc:name="File add"
			<sharepoint:file-content-stream ><![CDATA[#[attributes.queryParams.content]]]></sharepoint:file-content-stream>
		<ee:transform doc:name="Transform Message">
			<ee:message >
				<ee:set-payload ><![CDATA[%dw 2.0
output application/java
		<set-payload value="#[payload ++ ' Successfully created.']"
		doc:name="Set Payload" mimeType="text/plain"/>

	<flow name="FILE-GET-CONTENT-FLOW"  >
		<http:listener doc:name="Listener" config-ref="HTTP_Listener_config"
		<sharepoint:file-get-content doc:name="File get content"
			<sharepoint:file-server-relative-url ><![CDATA[#[attributes.queryParams.path]]]></sharepoint:file-server-relative-url>
		<set-payload value="#[payload]" doc:name="Set Payload"

	<flow name="FILE-GET-META-FLOW">
		<http:listener doc:name="Listener" config-ref="HTTP_Listener_config" path="/getmetadata"/>
		<sharepoint:get-metadata doc:name="Get metadata"
			<sharepoint:file-server-relative-url ><![CDATA[#[attributes.queryParams.path]]]></sharepoint:file-server-relative-url>
		<ee:transform doc:name="Transform Message">
			<ee:message >
				<ee:set-payload ><![CDATA[%dw 2.0
output application/json
	<flow name="FILE-DELETE-FLOW">
		<http:listener doc:name="Listener" config-ref="HTTP_Listener_config"
		<sharepoint:file-delete doc:name="File delete"
			<sharepoint:file-server-relative-url ><![CDATA[#[attributes.queryParams.path]]]></sharepoint:file-server-relative-url>
		<set-payload value="#[payload  ++ ' Successfully deleted.']"
		doc:name="Set Payload" mimeType="text/plain"/>

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.