Inbound SharePoint Stage
The Inbound SharePoint stage allows messages to be ingested into Integration Hub by monitoring a SharePoint site for the creation of new files.
Stage Overview
The Inbound SharePoint stage allows messages to be ingested into Integration Hub by monitoring a SharePoint site for the creation of new files.
The Inbound SharePoint stage was added in Integration Hub v5.0.0.
Logic Apps only support connecting to SharePoint using the credentials of a standard user account - the use of a Service Principal App Registration to connect to SharePoint is not supported. MFA and Conditional Access Policies may need to be configured with appropriate exemptions to allow ongoing use of the account.
Stage Definition File Location
All Inbound SharePoint stages are defined by creating an appropriately formatted JSON definition file in the following location:
Stage JSON Definition File Format
The JSON definition file for an Inbound SharePoint stage is as follows:
{
"name": "stage-name",
"displayName": "Brief Stage Title",
"description": "Brief description of the stage.",
"enabled": "$env:STATUS_<INTEGRATION_NAME>",
"concurrency": 10,
"recurrence": {
"interval": 10,
"frequency": "Minute"
},
"enableVnet": true,
"sharepointDetails": {
"apiConnectionName": "$env:SHAREPOINT_CONNECTION_NAME",
"siteAddress": "$env:SHAREPOINT_SITE_ADDRESS",
"libraryName": "$env:SHAREPOINT_LIBRARY_NAME",
"folderPath": "$env:SHAREPOINT_FOLDER_PATH",
"gateway": "$env:SHAREPOINT_GATEWAY"
},
"filter": {
"fileName": "CTPO",
"fileExtension": "txt"
},
"deleteSourceFile": true,
"deduplicate": {
"timeWindow": "HH:MM:SS",
"schemaMessageId": "schemas/path/to/transform.liquid",
"fileType": "json|xml|csv",
"hasHeader": "true|false",
"lineEnding": "windows|unix"
},
"preLogTransformSchemaFileName": "schemas/path/to/schema/schema-name.liquid",
"preLogTransformSchemaType": "liquid|javascript",
"preLogTransformFormat": "json|xml|csv"
}
| Property | Sub-Property | Description |
|---|---|---|
name | The name of the stage. | |
displayName | Optional (but highly recommended). A short (3 or 4 word) "display name" for the stage, used as a "title" of the stage in the Integration Hub Portal service's self-documentation capability. | |
description | Optional (but highly recommended). A brief (10 to 15 word) description of the stage, used as a brief description of the stage's purpose in the Integration Hub Portal service's self-documentation capability. For a more detailed explanation (when needed), use the stage markdown feature. | |
enabled | Optional boolean flag (true or false). Default is true.Generally set via a DevOps variable. Controls if the stage is deployed enabled or not. | |
concurrency | Optional number of concurrent runs permitted for the stage. Default is 10. | |
recurrence | Object defining how often the SharePoint service should be checked to see if new files have been uploaded. | |
interval | The frequency check value. | |
frequency | The definition of the unit of frequency to check for incoming files. Supports Second, Minute, Hour, Day, Week, or Month. | |
enableVnet | Optional. Boolean flag to indicate if the SharePoint connection should use VNet integration to ensure the use of a fixed IP address or not. Default value is false.VNet integration is only supported when deploying using Standard Logic Apps. | |
sharepointDetails | ||
apiConnectionName | A unique "name" that will be used (along with other information like the environment, region, Business Unit, etc.) to create an "API Connection" resource, that will actually be the connection to the SharePoint site. Can be reused across multiple integrations to reduce the number of times the "API Connection" resource needs to be authenticated (see below). Generally set via a DevOps variable. | |
siteAddress | The site address of the SharePoint site, e.g. https://{company}.sharepoint.com/sites/{siteName} | |
libraryName | The SharePoint library in the site. | |
folderPath | The folder path in the library to monitor for new files. | |
gateway | Optional. On-premises SharePoint services without a directly accessible hostname/IP address need to be accessed via an on-premises data gateway resource. If this is required, set this parameter to the Azure Resource ID of the resource, e.g. /subscriptions/{subscription_id}/resourceGroups/{resource_group}/providers/Microsoft.Web/connectionGateways/{resource_name} | |
filter | ||
fileName | If set, only ingest files that commence with the literal string segment provided. Does not support wildcards. The file name prefix matching is case insensitive. | |
fileExtension | If set, only ingest files that have the specified file name extension. The file extension matching is case insensitive. | |
deleteSourceFile | Optional. Boolean flag that indicates if the source file should be deleted from SharePoint once retrieved. Default value is true. | |
deduplicate | Inbound message de-duplication options, to allow incoming duplicate messages to be discarded. | |
timeWindow | The time window in which any duplicate payloads detected should be discarded. (Hours, minutes, and seconds.) | |
schemaMessageId | A filename that defines a Liquid transform, which will transform the received payload into a text string, which defines a unique ID for each message, allowing any duplicates of this unique ID received within the timeWindow to be discarded. | |
fileType | One of json, xml, or csv, defining the type of inbound file, so that the Liquid transform above can correctly handle the file transformation to the unique ID string. Only JSON, XML, and CSV files can be de-duplicated. | |
hasHeader | Required if fileType is csv. Set to either true or false to indicate if the CSV file has a header row or not. | |
lineEnding | Required when using the deduplicate feature, and when the fileType is set to csv. Set to either windows or unix.Defines if the Liquid transformation set by the deduplicate.schemaMessageId field (to transform the file into a unique ID value for the payload) should expect the CSV file being received to have Windows (\r\n) or Unix (\n) line endings. |
Pre-Logging Transformation
This stage supports the optional pre-logging transformation feature using the following fields:
preLogTransformSchemaFileNamepreLogTransformSchemaTypepreLogTransformFormat
See the Pre-Logging Transformation for details.
SharePoint Connection Setup
Upon deployment of an Inbound SharePoint stage, an API Connection resource will automatically be deployed, based on the provided value for the apiConnectionName.
Although this resource is automatically created, it is not possible for a SharePoint connection to be automatically authenticated, and the Inbound SharePoint stage requires that the API Connection resource be manually updated after initial deployment. This is a one-time action, and does not need to be repeated after subsequent deployments (unless the SharePoint account credentials are updated).
To authenticate the SharePoint service, navigate to the Integration Hub resource group and look for the created API Connection resource. The name will follow the convention of {environmentCode}{regionCode}-{owner}-{customer}-{apiConnectionName}-lga-con.
Select the "Edit API connection" option from the left navigation menu, and on the following page, click the "Authorize" button and you will be prompted to log in to SharePoint.
Log in with the credentials for the SharePoint service that you will be using for receiving files.
Once you enter the credentials correctly, you will get a notification that the authorisation process was successful. Click Save to complete the setup process.
Last updated on