Connect SPSync to Qdrant
SPSync writes one Qdrant collection per table: a list’s main table, each multi-value child table and the shared users table. Each row becomes a point whose payload is the row, keyed by an id SPSync derives from the row’s key. A row deleted in SharePoint is deleted from the collection. SPSync does not write a vector today, so the collections hold payload only and are useful for filtering and lookup alongside vectors you load another way.
Before you start
Section titled “Before you start”- A Qdrant cluster you can reach, and its URL, for example
https://xyz.cloud.qdrant.io:6333orhttp://qdrant.internal:6333. - Access to the cluster’s configuration (self-hosted) or the Qdrant Cloud console, to create an API key.
- 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.
Create the database and a least-privilege user
Section titled “Create the database and a least-privilege user”Qdrant has no users. Access is by API key.
- Qdrant Cloud: in the console, open the cluster, then API Keys, create a key and give it read and write access. Use a key limited to the collections SPSync will create if your plan offers collection-level access. A read-only key cannot create or write.
- Self-hosted: set
service.api_keyin the configuration (or theQDRANT__SERVICE__API_KEYenvironment variable) and use that value. A read-only key (service.read_only_api_key) is not enough. This is from the Qdrant documentation and has not been run here against a test cluster.
A cluster with no key set accepts any caller, which suits a closed test network only. SPSync accepts that: leave the key blank.
Scoped token (JWT RBAC). On a self-hosted cluster with service.jwt_rbac: true, you can
give SPSync a token that reaches only its own collections instead of the cluster key. The
cluster key is the secret that signs the token. spsync search-grants prints the claims to
sign. Qdrant matches collections by exact name, so list each one:
spsync search-grants --store qdrant --collection dev_projects --collection sp_users \ --expires-at 1893456000The shared users collection is named sp_users, with no prefix.
Limit. A collection-scoped rw token cannot create or delete collections: Qdrant needs
global manage access for that (see the “Table of Access” in
Qdrant’s security documentation). SPSync
creates its collections itself, and starts a new one ending _v2 when a column changes type.
So every collection, _v2 included, must already exist, created once with the cluster key,
before a scoped token works, and a column retype needs the cluster key again.
Sign the claims with any JWT tool and give SPSync the token as its API key. This is from the
Qdrant documentation and has not been run against a live cluster. A rw token can create
payload indexes on an existing collection, but SPSync has not been run end to end with a
scoped token.
SPSync creates the collections itself, named from the --prefix and the list, for example
dev_projects. When a column changes type, Qdrant would silently overwrite an existing
payload index, so SPSync checks first and starts a new collection ending _v2.
Allow SPSync to reach it
Section titled “Allow SPSync to reach it”Qdrant’s REST API is on TCP 6333, and 443 behind a load balancer or on some cloud plans. The connection starts from the machine that runs SPSync. For the Azure managed application, allow the address it connects out from.
- Self-hosted: allow the SPSync address in the host firewall or security group for 6333. Do not expose 6333 to the internet without a key and TLS.
- Qdrant Cloud: under the cluster’s Configuration, add the address to the IP allow-list, or use private networking and run SPSync inside it.
Encrypt the connection
Section titled “Encrypt the connection”Use an https:// URL. SPSync verifies the server’s certificate unless you turn that off. Qdrant
Cloud’s certificate comes from a public authority and needs nothing more. A self-hosted node
answers plain http:// unless you turn on TLS in its configuration, or put it behind a proxy
that does, and an http:// URL sends the key in clear text.
For a self-signed certificate or a corporate CA, give SPSync the CA certificate as PEM text. It 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.
Clearing Verify the server certificate turns checking off. The connection stays encrypted but SPSync no longer checks who it is talking to. Use it only while you fix the certificate. SPSync logs a destination_tls_verification_disabled warning on every run, Test connection reports “connected (warning: …)” and spsync doctor prints a WARNING.
This setting is a preview. SPSync’s automated tests run the real Qdrant client against a local TLS server, serving a certificate from a throw-away CA, and check that the connection succeeds with the CA and fails without it. It has not been run against Qdrant Cloud or a production cluster. 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.
Authentication SPSync supports today
Section titled “Authentication SPSync supports today”An API key, or none for a cluster that has no key. There is no basic authentication, and
a scoped JWT token is accepted only as the API key value: SPSync sends it unchanged and does
not manage it. spsync search-grants --store qdrant prints the claims to sign.
Connect from SPSync
Section titled “Connect from SPSync”-
Desktop app: open the Destination screen, choose Qdrant, enter the Qdrant URL and, if the cluster has one, the Qdrant 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 astls_ca_env(an environment variable, or afile:orenv:reference), withtls_client_cert_envandtls_client_key_envfor mutual TLS.SPSYNC_QDRANT_STATE_PATHholds the path of the local state file, not a network address.Terminal window export SPSYNC_QDRANT_STATE_PATH=/var/lib/spsync/qdrant-state.duckdbexport SPSYNC_QDRANT_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 qdrant --connection-string-env SPSYNC_QDRANT_STATE_PATH \--dataset-name main \--qdrant-url https://xyz.cloud.qdrant.io:6333 \--qdrant-api-key-env SPSYNC_QDRANT_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. You enter the API key on the secure entry page, never in the chat.
What Test connection and doctor check
Section titled “What Test connection and doctor check”Both list the cluster’s collections. A pass means the URL is reachable, the certificate is
trusted and the key is accepted for reading. It does not prove the key can create a collection
or write points, so a read-only key passes the test and fails at the first sync. spsync doctor reports the probe as destination-connectivity.
Qdrant has no “who am I” call, so when the API key is a JWT (Qdrant’s role-based access
control) spsync doctor reads the token’s own claims and appends what it grants and when it
expires, for example as JWT key (access: ks_tasks: rw). It adds a warning when the key has
expired or expires within 14 days. The signature is not checked and no part of the key is
printed. A static API key carries no claims, so nothing is added for it.
Each run also writes one destination.connected_as line to the run log with the same identity (and the same expiry warning for a JWT key). If the key is not a JWT, or the lookup fails, the line is left out and the run is not affected.
Common errors
Section titled “Common errors”| What you see | What it means and the fix |
|---|---|
Connection refused, timeout or ConnectError |
A firewall, security group or IP allow-list is blocking the port, or the URL or port is wrong. |
TLS certificate problem; server certificate verified against the system trust store |
The certificate is self-signed or from a private CA. Paste the CA into CA certificate bundle, or use a public certificate. |
Unexpected Response: 401 or 403 (Forbidden) |
The key is wrong, or it is read-only. Use a key with write access. |
Unexpected Response: 404 on a Qdrant Cloud URL |
The path or port is wrong. Use the cluster URL the console shows, ending in the port. |
| A first sync fails after the test passed | The key can list but not write. Replace it with a read and write key. |