Skip to content

Connect SPSync to Weaviate

SPSync writes one Weaviate collection per table: a list’s main table, each multi-value child table and the shared users table. Each row becomes an object whose id SPSync derives from the row’s key, so an updated row replaces the same object. A row deleted in SharePoint is deleted from the collection. SPSync sends no vector, so a collection holds the row’s properties only.

  • A Weaviate cluster you can reach, and its REST address, for example http://weaviate.internal:8080.
  • Access to the cluster’s configuration to set an API key, if you want one.
  • Nothing to install on the machine that runs SPSync. SPSync keeps a small local state file (a DuckDB file) that records what it last sent, so it sends only the rows that changed. Keep that file on a disk that survives restarts.
  • On Weaviate 1.40 or newer a collection created with no vector configuration has no vector. Before 1.40 the cluster’s default vectorizer applies, so a collection might call an embedding service you have set as the default. Check the default if you did not intend that.

Create the database and a least-privilege user

Section titled “Create the database and a least-privilege user”

Weaviate has no separate login for SPSync beyond its API key.

  • Self-hosted, API key authentication: in the cluster’s environment, turn on API key authentication and list the keys and the users they belong to (AUTHENTICATION_APIKEY_ENABLED, AUTHENTICATION_APIKEY_ALLOWED_KEYS, AUTHENTICATION_APIKEY_USERS). This is from the Weaviate documentation and has not been run here against a test cluster.
  • Authorization: if the cluster uses role-based access, give SPSync’s user a role that can create collections, add properties and read, write and delete objects in the collections named from your --prefix, for example dev_*. Without authorization configured, every authenticated user has full access.
  • No key: a cluster with anonymous access on needs none. Leave the key blank.

spsync search-grants --store weaviate --prefix dev_ prints a role limited to collections beginning with your prefix, plus the unprefixed sp_users collection, and the call that assigns it to the user. It runs nothing and has not been run against a live cluster.

SPSync creates the collections itself. When a column changes type, Weaviate rejects a change to an existing property, so SPSync starts a new collection ending _v2.

Weaviate needs two ports, and both must be reachable from the machine that runs SPSync:

  • REST on TCP 8080 (the address you enter), and
  • gRPC on TCP 50051 by default. Most calls, including the bulk import SPSync uses for rows, go over gRPC, so a cluster with only 8080 open passes a basic REST check but fails to load.

SPSync uses the same host name for gRPC as for REST and only lets you change the gRPC port. A deployment whose gRPC endpoint is on a different host name, as some hosted Weaviate offers have, cannot be reached today. For the Azure managed application, allow the address it connects out from.

  • Self-hosted: allow both ports from the SPSync address in the host firewall or security group, and in any load balancer. A load balancer must pass gRPC (HTTP/2).
  • Kubernetes: expose both the REST and gRPC services, and mind the proxy’s HTTP/2 support.

An https:// URL turns on TLS for both REST and gRPC. With no port in the URL, SPSync uses 443 for https and 80 for http, so write the port when it differs. A cluster you run answers plain HTTP unless you put TLS in front of it, and an http:// URL sends the key in clear text, so keep it to a closed network.

SPSync verifies the server’s certificate. For a self-signed certificate or a corporate CA, give SPSync the CA certificate as PEM text. It is used for both channels and replaces the machine’s trust store for this destination only. On the Destination screen, paste the PEM into CA certificate bundle. A client certificate for mutual TLS goes in Client certificate and Client private key (an unencrypted PEM key). SPSync keeps these as stored secrets: in the operating system keychain on the desktop app, and as a Key Vault reference in the Azure edition, and it never shows them again after you save.

Weaviate has no switch to turn checking off, because the gRPC channel always verifies. Supply the CA instead. spsync doctor prints a destination-tls line with the trust mode and, where a plain TLS handshake can read it, the server certificate’s subject and expiry date.

This setting is a preview. SPSync’s automated tests run the real Weaviate client’s REST channel and a real gRPC channel against local servers that present a certificate from a throw-away CA, and check that each succeeds with the CA and fails without it. It has not been run against Weaviate Cloud or a production cluster.

An API key, or none for a cluster that allows anonymous access. There is no basic authentication.

OIDC with client credentials is available as an alternative to the API key. Enter the Weaviate OIDC client secret (and, if your identity provider needs them, the scopes). SPSync exchanges the secret for a token at the identity provider your cluster advertises. Use the API key or the OIDC secret, never both. Password-based and token-based OIDC sign-in are not supported. The OIDC secret is stored like the API key and never shown again. Test connection and spsync doctor then print the user your cluster sees (for OIDC, the token’s subject) and its roles, where the cluster is Weaviate 1.30 or later. OIDC login is a preview: it has not been run against a live Entra ID or other OIDC provider.

  • Desktop app: open the Destination screen, choose Weaviate, enter the Weaviate URL (the REST address), the Weaviate gRPC port and, if the cluster has one, the Weaviate API key, then choose Test connection. SPSync manages the local state file itself.

  • CLI: the config names environment variables, never the key itself. A private CA goes in the destination: block as tls_ca_env (an environment variable, or a file: or env: reference), with tls_client_cert_env and tls_client_key_env for mutual TLS. OIDC uses weaviate_oidc_client_secret_env and weaviate_oidc_scope in place of weaviate_api_key_env. SPSYNC_WEAVIATE_STATE_PATH holds the path of the local state file, not a network address.

    Terminal window
    export SPSYNC_WEAVIATE_STATE_PATH=/var/lib/spsync/weaviate-state.duckdb
    export SPSYNC_WEAVIATE_API_KEY='<api key>'
    spsync export-config --output replication.yaml \
    --site-url https://contoso.sharepoint.com/sites/x --list Projects \
    --pipeline-name spsync_dev --prefix dev \
    --destination-kind weaviate --connection-string-env SPSYNC_WEAVIATE_STATE_PATH \
    --dataset-name main \
    --weaviate-url http://weaviate.internal:8080 --weaviate-grpc-port 50051 \
    --weaviate-api-key-env SPSYNC_WEAVIATE_API_KEY \
    --client-id <entra-app-client-id>

    For a cluster with no key, leave out the last key flag.

  • AI assistant: with the admin MCP server connected, ask for the destination requirements, then let the assistant create the destination with the URL and gRPC port. You enter the API key on the secure entry page, never in the chat.

Both connect to the REST and gRPC ports and ask whether the cluster is ready. A pass means both ports are reachable and the cluster reports ready. It does not prove the key can create collections or write objects, so a key without those rights passes the test and fails at the first sync. spsync doctor reports the probe as destination-connectivity.

On Weaviate 1.30 and later with authentication on, spsync doctor also asks the cluster who it connected as and appends the user and its roles to that line, for example as spsync-svc (roles: writer). No credential is printed. An older cluster, or one that does not answer, simply leaves the identity out and the check still passes.

Each run also writes one destination.connected_as line to the run log with the same identity. If the cluster will not say, the line is left out and the run is not affected.

What you see What it means and the fix
Connection refused or a timeout on connect A firewall, security group or load balancer is blocking 8080 or 50051, or the URL is wrong.
Weaviate cluster ... is not ready The cluster answered but is still starting or unhealthy. Wait and retry, and check its logs.
gRPC or UNAVAILABLE errors with REST working The gRPC port is closed or wrong. Open it, or set the right port in Weaviate gRPC port.
401 Unauthorized or UNAUTHENTICATED The key is wrong, or the cluster needs a key and none was given.
403 Forbidden or PERMISSION_DENIED The key’s user has no rights to create or write the collection. Adjust its role.