Switchboard
Menu

Sign in on your laptop. Run from your server.

Peering connects two self-hosted Switchboard instances over a WebSocket. Share selected connections with scripts and agents on another instance, or explicitly let a trusted peer use an authentication source. Nothing is shared by default.

Interactive authentication is useful when a service needs a browser and your server has no desktop. This walkthrough uses Microsoft Authentication on a laptop → Outlook Mail on a trusted server. Complete the browser sign-in on your laptop, approve authentication sharing, then let a local Outlook Mail connection on the server call Microsoft directly.

Ordinary connection sharing runs calls on the original device and keeps provider credentials there. Sharing authentication adds a separate permission to transfer credentials to the trusted server. Decide which behavior you need before granting it.

1. Prepare both instances

  • Both instances need peer protocol 3 and authentication-source support. Update both if the sharing grant or source selector is absent. Use administrator access to pair them and configure which receiving users can use shared connections.
  • Give the server a reachable HTTPS origin with WebSocket support. The laptop can initiate the outbound link from behind a firewall; it does not need an inbound public address. Keep the reverse proxy's WebSocket upgrade enabled.
  • On the laptop, install Microsoft Authentication from the Microsoft plugin repository, folder plugins/microsoft-authentication. Have Edge or Chrome available on that computer.
  • On the server, install Outlook Mail (plugins/outlook-mail) and its shared Microsoft helper dependency (plugins/microsoft). See installing a plugin for the registry workflow.
  • Use a demo Microsoft account that can sign in to Teams web and has mailbox access. Account permissions, organization policies and MFA still apply. This method uses existing web access without registering an application; it does not grant new Microsoft permissions.

The steps below use “Laptop” and “Trusted server” as peer names. Do not use this public documentation site as your server origin.

2. Pair the laptop and server

  1. On the server, open Peers → Add peer → Accept a connection from the other machine. Name the peer “Laptop”. Copy the server origin and device token privately.
  2. On the laptop, open Peers → Add peer → Connect to the other machine. Name it “Trusted server” and enter that origin and device token.
  3. Confirm the peer is online. On the server, allow the intended local user to use connections received from this peer. The local peer owner is always included; other users need an explicit receiving-side permission.

Outcome: the instances have a direct authenticated link. The device token pairs instances; it does not approve connection or authentication sharing. Keep it out of screenshots, source control and chat.

3. Sign in on the laptop

  1. Add a Microsoft Authentication connection on the laptop. Choose Sign in through local browser and give it a name such as demo-microsoft-auth.
  2. Complete the Microsoft prompts in the dedicated Edge or Chrome window on the laptop. The window closes when authentication finishes. There is no device code to copy to the server.
  3. Confirm the source connection is ready. If Microsoft requires interaction later, use Reconnect on this original laptop connection and complete sign-in again.

The browser is used for authentication only. Its saved profile and cookies stay on the laptop. Protect that browser data and its backups with the same care as other saved sign-ins.

4. Approve authentication sharing

On the laptop, open the source connection's actions → Share with peers to open its Sharing dialog. Select “Trusted server” for ordinary connection sharing first.

Trust this server before continuing. Enabling the additional grant lets its backend receive and store refresh-capable API credentials, encrypted at rest. It can call Microsoft and renew credentials without the laptop. Browser profiles and cookies stay on the laptop. An offline server's exported credentials cannot be recalled by Switchboard.

Under Share authentication, enable Allow authentication on Trusted server. This is a separate, explicit approval by the source connection owner. It is available only for directly paired peers and cannot be forwarded through another peer. Credentials from an authentication source are not returned to the web UI or through its regular token API.

Outcome: an authorized server user can select the received source. Ordinary sharing alone leaves it unavailable as an authentication source.

Real Switchboard Sharing dialog with ordinary sharing selected and the separate Allow authentication on Server checkbox enabled
Real two-instance protocol demo using the core's synthetic authentication fixture. The same Sharing dialog controls Microsoft Authentication; no Microsoft account or credentials are shown. View full size

5. Add Outlook Mail on the server

  1. On the server, add a local Outlook Mail connection.
  2. Choose Use Microsoft Authentication. In Authentication connection, choose demo-microsoft-auth · peer. Set Access → Read email for this walkthrough; the default grants broader access.
  3. Open Console, select this local Outlook Mail connection and inspect its available operations. Choose the listed operation to read a small number of demo messages, such as a message-list read with a limit of one where supported. Send the request and confirm a successful response. Keep mailbox content out of shared screenshots and logs.

Use the operation and request shape shown for your actual connection. Depending on the session's existing permissions, the plugin can use Graph or an Outlook compatibility API with different paths and bodies. Do not mix their IDs or request formats. Microsoft's retired public Outlook REST API is not a general supported endpoint; the plugin's private compatibility backend can change.

Outcome: your server sends the API request directly to Microsoft using the approved source. It is not relaying the mail request through the laptop. Scripts and MCP clients can now use the server's local connection under their normal connection permissions. See connecting MCP.

Real Switchboard consumer fixture setup with the received work-authentication source selected and marked peer
Protocol demo with a synthetic consumer, not Outlook Mail. Its Source field shows the peer marker; in Outlook Mail the corresponding field is Authentication connection. A live Microsoft mailbox sign-in was not exercised for these captures. View full size

6. Work while the laptop is offline

After the destination connection has obtained credentials, disconnect the laptop's peer link and repeat the read on the server. A compatible Microsoft connection can use its cached access credentials and renew over HTTP while the laptop is offline, subject to credential validity and provider policy. A successful read with an unexpired token alone does not prove refresh works.

If renewal needs fresh browser authentication, bring the laptop online, Reconnect its Microsoft Authentication source, finish the prompts and retry the server request. Product connections do not need to be reconnected after the source sign-in. Microsoft web refresh tokens can have a 24-hour SPA lifetime limit; rotation does not extend that limit, and MFA or session policy may require interaction sooner.

A plain shared connection behaves differently: its calls run at the origin. While that device is offline, calls fail immediately with 503 / peer_offline; they are never queued or replayed.

Also: reach Apple Reminders on a Mac

Peering also brings services without a public web API to a server. Apple Reminders uses Apple's local EventKit framework on a Mac. A script on a Linux server can use a shared Reminders connection while the actual operation runs on that Mac.

  1. Install Apple Reminders from the macOS plugin repository, folder plugins/apple-reminders, on the Mac running Switchboard directly. It is not available on a Linux or Docker host. Run Switchboard in the logged-in macOS user's session, such as a per-user LaunchAgent.
  2. Install Xcode Command Line Tools (xcode-select --install) once to compile the helper. Connect Apple Reminders using This Mac and approve its full Reminders access. If denied, open System Settings → Privacy & Security → Reminders and allow Switchboard Apple Reminders. This is Reminders permission, not Mail's Automation permission.
  3. Pair the Mac and server as above. On the Mac, use Share with peers to share this connection with the server. Allow the intended receiving user on the server. No authentication-sharing grant is needed: EventKit access stays on the Mac.
  4. On the server, select the received Apple Reminders connection in Console and send the listed GET /lists?pageSize=1 read. Confirm success with a demo macOS account or list. Shared connection access includes the plugin's write operations; share only with users and peers you trust, and keep script tokens limited to the connections needed.

The Mac's Switchboard process, user session, permissions and peer link must remain available. If the Mac sleeps, shuts down or disconnects, calls fail immediately with 503 / peer_offline. They are not queued, and the server cannot use a cached Microsoft credential to run EventKit locally. This example uses ordinary remote execution, rather than the cached authentication transfer in the main walkthrough.

See the maintained Reminders setup and permission guide.

7. Stop sharing

On the laptop, clear Allow authentication on Trusted server, or remove the ordinary connection share. New credential transfers stop. Once the server receives the change, linked consumers stop using their cached credentials, including access tokens that have not expired.

An offline server may still hold credentials already transferred to it. For immediate provider-side invalidation, use Microsoft's session revocation controls; provider rules determine when tokens stop working. Disabling the peer also stops ordinary sharing in both directions without deleting either device's local service connections.

If the source is missing or a call fails

  • No source to select: confirm the direct peer link, both sharing grants, receiving-user access and compatible core/plugin versions. The source must use the format expected by the destination plugin; a forwarded connection is not eligible.
  • Browser sign-in unavailable: install Edge or Chrome on the laptop, check the Microsoft Authentication browser setting and upgrade the core if needed. Complete sign-in on the authentication device.
  • Permission unavailable: select an access level already granted to the Microsoft session, or use another supported authentication method. Peering cannot bypass account permissions, MFA or organization policy.
  • Expired authentication: reconnect the source on the laptop and retry the server call. If the laptop is offline and cached renewal no longer works, restore that link first.
  • Peer offline: check the server origin, TLS and proxy WebSocket support. Plain shared calls require the origin online; only a local compatible consumer with cached authentication has the offline behavior described above.

For maintained details, read the core Peers guide and Microsoft web authentication guide.