SharePoint Connection

Description

This metadata type adds the SharePoint sites of a Microsoft 365 tenant to your project as a file system, and describes how Apache Hop signs in to that tenant through the Microsoft Graph API. The name of the connection is also a file system scheme: the SharePoint sites of the tenant, their document libraries and the files in them can be read and written with paths such as name:///sites/site/library/folder/file.csv. See Microsoft SharePoint VFS for the layout of these paths.

Hop signs in as an application, not as a person. Register an application in Microsoft Entra ID, grant it Microsoft Graph application permissions and have an administrator consent to them:

  • Sites.Read.All to read files

  • Sites.ReadWrite.All to also create, replace, rename and delete files and folders

  • Sites.Selected to only reach the sites the application was granted. These sites can not be listed: use the full path of the site, name:///sites/site/library, and set the SharePoint host on the connection if the site is not found.

Options

Option Description

Name

Name of the connection, this is the scheme used in file paths: name://

Description

Description field for additional information

Authentication type

How Hop signs in to Microsoft Entra ID:

  • Client secret authentication: the client ID and a client secret of the registered application

  • Client certificate authentication: the client ID and a certificate of the registered application

  • Managed identity: the identity of the environment Hop runs in, found through the default Azure credential chain (managed identity, environment variables, Azure CLI, and so on)

Tenant ID

The Directory (tenant) ID of your Microsoft Entra tenant

SharePoint host

The SharePoint host of the tenant, for example contoso.sharepoint.com. Optional in most cases, see SharePoint host.

Client ID

The Application (client) ID of the registered application. Not used with a managed identity.

Client Secret

The client secret of the registered application, for client secret authentication

PEM Certificate

The certificate and its private key in PEM format, for client certificate authentication

All the options except the name, the description and the authentication type accept variables.

SharePoint host

A site is read by its address, <host>/sites/<site> or <host>/teams/<site>, so that a file is reached without listing all the sites of the tenant. This also works when the application is not allowed to list the sites. The sites are only listed to browse the folders name:///sites and name:///teams.

When the option is empty, Hop reads the root site of the tenant to find the host, so the connection usually works without it. Set it when:

  • The application can not read the root site, for example with Sites.Selected and no grant on the root site. The log then says The SharePoint host of the tenant can not be read, set it on the connection.

  • The sites are on another host than the root site of the tenant.

  • You want to save the request that reads the root site.

Test on this editor requests a Microsoft Graph token with the values in the form.

Explore on this editor opens the VFS File Explorer at name:///.