This connector allows to upload files to Microsoft Sharepoint O365 through Graph API. More information in documentation.
Required Microsoft Graph API Application permissions
- Files.ReadWrite.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.
return
[
{
"Directory": "/drive/root:/testFolder",
"Name": "file.txt",
"Data": "VGVzdGluZyBmaWxlIGNvbnRlbnQ="
}
]
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 Write configuration
Working Mode
- Fail when file exists - failed when file already exists
- Replace existing file - when file already exists its content is replaced by new content
- Create new file with number increment name - file is uploaded with new created name with some increment post-name
Delete temporary file when error occured
If set to true
, temporary file will be deleted after session expires.
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
Sharepoint O365 file writer input (ver. 1.0.0)
Column | Data type | Allow null | Description |
---|---|---|---|
Directory | string | No | Path to file |
Name | string | No | Name of file |
Data | Base64 | No | File content |
Example input data
Directory: string |
Name: string |
Data: Base64 |
---|---|---|
/drive/root:/testFolder | file.txt | VGVzdGluZyBmaWxlIGNvbnRlbnQ= |
Output
This connector has no output schema.
Release notes
3.5.0
- Added new description and icon.
3.4.3
- Fixed shared nuget package versions.
3.4.2
- Fixed right processing of nullable properties.