Skip to content
background-image background-image

microsoft_sharepoint_o365

Microsoft Sharepoint O365 File Reader Connector

  • Version

    3.5

  • Agent restriction

    None

  • Processing type

    Row by row

  • Multi-input step

    Not Supported

This connector allows to get files from Microsoft Sharepoint O365 through Graph API. More information in documentation.

Required Microsoft Graph API Application permissions

  • Files.Read.All
  • Sites.Read.All

Site and Drive

One of configuration options are Site and Drive.

Site can be just company sharepoint intelstudios.sharepoint.com but it can also contain sub sites. In web URL it can be behind sites path e.g. https://intelstudios.sharepoint.com/sites/DEV... which shows sub site name DEV. In this case Site configuration attribute will be specified as intelstudios.sharepoint.com/DEV of DEV if DEV sub site is needed.

Site have data unit/s named drive which is another part of URL behind site or sub site. Typical example is Documents but is a little tricky because in URL it is displayed as Shared%20Documents, e.g. intelstudios.sharepoint.com/sites/DEV/Shared%20Documents. Other drives have usually same name as in URL.

But when site or drive is specified incorrectly connector will print available names to error message which can help to configure it.

Example

Just for example how you can make input for this connector by JS Mapper connector as step before. In Directory attribute is path to file or files.

return
[
    {
        "Directory":'Data migration/Data sheets', 
        "Name": 'file.txt'
    }
]

Configuration

Azure Auhtentication configuration

Prerequisites

To successfully use this configuration, you must have defined Application registration on your Tenant ID Instance on https://portal.azure.com:

  1. Open Microsoft Azure portal.
  2. Go to Manage Azure Active Directory for your Tenant ID.
  3. Click on App registrations on the left side menu.
  4. Click on New registration:
    1. Fill Name
    2. Set Supported account types to Accounts in this organizational directory only (Single tenant)
    3. Click on Register button
  5. When App registration already exists click on existing app registration in list
  6. Click on Authentication on the left side menu:
    1. Check ID tokens (used for implicit and hybrid flows) property.
  7. Click on API permissions on the left side menu:
    1. Click on Add a permission
    2. Select Microsoft Graph tile from Microsoft APIs on the right side menu:
      1. Select Application permissions.
      2. Check corresponding API permissions.
      3. Click on Add permissions button.
    3. When its needed click on Grant admin consent button over assigned permissions list.
  8. Use filled properties from App registration application into configuration:
    1. Click on Certificates & secrets on the left side menu:
      1. Add new client secret value.
      2. Take this new created Value and insert it into Client Secret configuration property.
    2. From the Overview left side menu:
      1. Take Application (client) ID and insert value into Azure Client Application ID configuration property.
      2. Take Directory (tenant) ID and insert value into Tenant ID configuration property.

Azure Active Directory Instance

URL of AAD Instance that the authentication is provided.

https://login.windows.net/

Tenant ID

Tenant identifier that the data should be returned for. Is visible on azure portal https://portal.azure.com in application Overview in App registrations.

61e057ea-2890-4d8e-95af-f35789a661f0

Azure Client Application ID

The unique identifier for Azure Client Application. Is visible on azure portal https://portal.azure.com in application Overview in App registrations. The application must have defined API permissions for specific operations.

e0bd7921-1a85-4ed9-8bbe-77b9ebdbaa4f

Resource ID

ID of the resource to get the data.

https://graph.microsoft.com

Api Version

API Version.

Default: v1.0

Authentication Mode

Supported authentication modes

  • Username and password
  • Client secret

Username

Client user name

Password

Client password

Mailbox

Define Subscription Bind Mailbox which is used for emails processing.

Client Secret

Client secret

Sharepoint File Read configuration

Working Mode

  • Read single file - single file is returned, in input must be filled Name of file and Directory if not in root on drive
  • Read all files - read all files based on Directory attribute of input
  • Read only new files - read new files based on Directory attribute of input
  • Read only modified files - read all files based on Directory attribute of input

Return content

If set to true, file content is also returned.

Number of files to process

Maximum number of files which will be processed in one task run (0 = unlimited, n = exact number).

Sharepoint Site configuration

Site

Name of site or sub site.

Example

  • https://intelstudios.sharepoint.com
  • https://intelstudios.sharepoint.com/SubSiteName

Drive

Name of custom drive, empty will use root drive. Typical can be Documents. To find your specific DriveId use Microsoft Graph explorer

Example

  • b!dbzcQi3Vp0ap4vuJ7Pxo0U2JU6-0n2RBvWyDxr9XDLo8O0zSh0XESLUh8xzuXIcw
  • b!dbzcQi3Vp0ap4vuJ7Pxo0U2JU6-0n2RBvWyDxr9XDLqjKHPd7fh4S5eC-x9wESjl

Input & Output Schema

Input

Input schema has just two attributes and based on configuration it can read files on some path or it can read specific file directly when name is also filled.

Sharepoint O365 file reader input (ver. 1.1.0)

Column Data type Allow null Description
Directory string Yes Path to files or specific file
Name string Yes Name of file

Example input data

Directory: string Name: string
dir1/dir2/dir3 file.txt

Output

Output schema contains information about file. Content can be included based on configuration.

Sharepoint O365 file reader output (ver. 1.0.0)

Column Data type Allow null Description
Id string No ID
Name string No Name of file
Path string No Path to file
WebUrl string No Web URL
DownloadUrl string No Download URL
Data Base64 Yes Base64 content
Size integer No Size in Bytes
Created DateTime No Created date
Modified DateTime No Modified date

Example output data

Id: string Name: string Path: string WebUrl: string DownloadUrl: string Data: Base64 Size: integer Created: DateTime Modified: DateTime
01HBAVUOMW file.txt /drives/b!2b... https://intelstu https://intelstu... UEsDBBQA... 65976 2020-05-15T12:59:52Z 2020-05-15T14:59:24Z

Release notes

3.5.0

  • Added new description and icon.

3.4.4

  • Fixed shared nuget package versions.

3.4.3

  • Fixed right processing of nullable properties.