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