Microsoft SharePoint Connector 3.4 - Mule 4

Support Category: Select

Anypoint Connector for Microsoft SharePoint (Microsoft SharePoint Connector) supports both SharePoint 2013 and SharePoint Online for use in the cloud and on-premises. This connector enables you to manage content and document management, to access intranet and extranet portals and websites, to collaborate with, and to search your entire enterprise. This connector also enables integration with SharePoint through its REST API.

For compatibility information and fixed issues, see the Microsoft SharePoint Connector Release Notes.


To use this connector, you must be familiar with:

  • The Microsoft SharePoint API

  • Anypoint Connectors

  • Mule runtime engine (Mule)

  • Elements and global elements in a Mule flow

  • Creating a Mule app using Anypoint Studio (Studio)

Before creating an app, you must have:

  • Credentials to access the Microsoft SharePoint target resource

  • Anypoint Platform

  • Anypoint Studio version 7.x or later

POM File Information


Replace x.y.z with the version that corresponds to the connector you are using.

To obtain the most up-to-date pom.xml file information, access the connector in Anypoint Exchange and click Dependency Snippets.

Connect in Design Center

Anypoint Design Center’s Flow Designer enables you to create apps visually. For more information, see the Flow Designer Tour.

To create an app in Flow Designer:

  1. Configure the input source (trigger) for your app.

  2. Configure the target component for your app.

For information about Flow Designer field values, see the Microsoft SharePoint Connector Reference.

Configure the Trigger

  1. In Design Center, click Create.

  2. Click Create new application to open Flow Designer.

  3. Specify a value for Project name and click Create.

  4. Click Go straight to canvas to exit from Let’s get started.

  5. Click on the trigger card.

  6. If you are using your connector as a trigger, search for the connector; otherwise, use HTTP or Scheduler.

    Microsoft SharePoint Connector provides these trigger operations:

    • Created Objects

    • Modified Objects

    • Deleted Objects

      sharepoint global config
  7. Depending on the operation you are performing, provide these required fields:

    1. Object Type: Folder, File, List, or List Item

    2. Connection: Okta, Online, or security token authentication

    3. Security Token

    4. Site URL

  8. Select the plus sign (+) to add a component.

  9. Select the connector as a component.

  10. Configure the 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:

Security Token Authentication

You can use a SAML security token to log in to SharePoint. The following shows how to configure a security token in Studio:

Security Token Configuration
  • Security token: Enter the corresponding security token.

  • Site URL: Enter the corresponding site URL.

You can obtain a security token by making a POST request to with the following XML body:

<s:Envelope xmlns:s=""
    <a:Action s:mustUnderstand="1"></a:Action>
    <a:To s:mustUnderstand="1"></a:To>
    <o:Security s:mustUnderstand="1"
    <t:RequestSecurityToken xmlns:t="">
      <wsp:AppliesTo xmlns:wsp="">

The response from the previous request contains the security token between the <wsse:BinarySecurityToken> tags.

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.

Add the Connector to Your Studio Project

Anypoint Studio provides two ways to add the connector to your Studio project: from the Exchange button in the Studio taskbar or from the Mule Palette.

Add the Connector Using Exchange

  1. In Studio, create a Mule project.

  2. Click the Exchange icon (X) in the upper-left of the Studio task bar.

  3. In Exchange, click Login and supply your Anypoint Platform username and password.

  4. In Exchange, search for "share".

  5. Select the connector and click Add to project.

  6. Follow the prompts to install the connector.

Add the Connector in Studio

  1. In Studio, create a Mule project.

  2. In the Mule Palette view, click (X) Search in Exchange.

  3. In Add Modules to Project, type "share" in the search field.

  4. Click the connector’s name in Available modules.

  5. Click Add.

  6. Click Finish.

Configure Your First Flow

To configure:

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

  2. Specify a value for 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

Create an Anypoint Studio Flow

To create an Anypoint Studio flow:

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

  2. Specify a value for 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.

  6. Click OK.

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

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

  9. 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.

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  2019-10-14 22:12:42,003 [main] org.mule.module.launcher.DeploymentDirectoryWatcher:
    + Mule is up and kicking (every 5000ms)                    +
    INFO  2019-10-14 22:12:42,006 [main] org.mule.module.launcher.StartupSummaryDeploymentListener:
    *  - - + DOMAIN + - -               * - - + STATUS + - - *
    * default                           * DEPLOYED           *
    * - - + APPLICATION + - -   * - - + DOMAIN + - -  * - - + STATUS + - - *
    * myapp                     * default             * DEPLOYED           *

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?

    SharePoint Online supports authentication using standard SharePoint Online user credentials is supported, secure authentication, and 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.

  • How do I parse an HTML form so that I can test the demo?

    Use the <parse-template> statement, as shown in the Use Case XML section. In this use case, forminput.html is the file that Mule uses as a template into which to insert values extracted from the message properties or variables. For more information, see the Parse Template Reference.

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" />
		doc:name="SharePoint online">
			disableCnCheck="${sharepoint.disableCnCheck}" />
	<flow name="UI-PROVIDER">
		<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"/>