Skip to main content

Write SharePoint

Synopsis

This operator uploads the input file to the SharePoint.

Description

Before you can upload the input file to the selected SharePoint, you must load it with an Open file operator.

After you have configured your SharePoint account(see below), you can load the SharePoint file with this operator.

In order to access SharePoint service, you need to set up an application connection with Microsoft. This involves a number of steps and at the end, you will have the credentials to create a RapidMiner Sharepoint Connection, needed as an input of this operator. These steps require user-specific choices, but the overall workflow along with some hints is explained below.

The Operator is based on Microsoft's Graph API using its v1.0 endpoint. Further information on Graph API can be found over: https://developer.microsoft.com/en-us/graph.

Login to Microsoft Azure Portal at: https://portal.azure.com with your company's active directory account (which you use to access SharePoint, Outlook or other Office 365 services)

  • Search for "App Registrations" and then click on "New registration". Enter a name for your application and provide this "https://storageauth.rapidminer.com" as the redirect URI for the type Web.
  • During App creation, the system will give you a "Client Secret", which is a hash string. Keep it as it’s needed for the Connection. You can later create new secrets from “Certificates and secrets”.
  • During App creation, please enable the two check-boxes for "Access tokens" and "ID tokens". You can edit that later in “Authentication”.
  • After App creation, you need to grant it API-level permissions. Click on "Api permissions" link in the left panel. It will show you "Microsoft Graph" API hierarchy.
  • For the "Application Flow" - Select "Application permissions" and grant at least these: Application.ReadWrite.All, Application.ReadWrite.OwnedBy, Device.ReadWrite.All, Directory.Read.All, Directory.ReadWrite.All, Domain.ReadWrite.All, Sites.Manage.All, Sites.Read.All, Sites.ReadWrite.All, User.Read.All.
  • For the "OAuth 2.0 Delegated Flow" - Select "Delegated permissions" and grant at least these: AllSites.Manage, AllSites.Read, AllSites.Write, MyFiles.Read, MyFiles.Write, Project.Read, Project.Write.
  • After the App has been created, click on the name of your App. You will see some properties you’ll need for the Connection: Application (client) ID and Directory (tenant) ID.
  • Your admin needs to approve your account. Approval is done opening this URL and following the message displayed. You can build the URL with https://login.microsoftonline.com/{YOUR_DIRECTORY_TENANT_ID}/adminconsent?client_id={YOUR_APPLICATION_CLIENT_ID} (you’re the previously obtained values of the {} placeholders.
  • The SharePoint "site" is visible in your SP URL. If the URL is https://company.sharepoint.com/sites/onboarding, the SharePoint URL is company.sharepoint.com and the SharePoint Site is onboarding.

Input

file

The file object which should be uploaded to SharePoint account. The file must be provided by an Open file operator.

connection

This input port expects a Connection object if any. See the parameter connection entry for more information.

Output

file

The input file object is passed through and returned here.

connection

This output port delivers the Connection object from the input port. If the input port is not connected the port delivers nothing.

Parameters

Connection entry

This parameter is used to specify a repository location that represents a connection entry. The connection can also be provided using the connection input port.

File

Enter the name of the file as it should be stored on SharePoint, e.g., /myfolder/my_file.xls.

Overwrite

If the checkbox is activated, the input file will overwrite existing files with the same file name. If the checkbox is not activated, existing files with the same name are not overwritten. The option is deactivated by default.

See Also