From c348a0407f8d89cb7a6f3a74a3dd69396fe867dd Mon Sep 17 00:00:00 2001 From: Teddy Arida-Moody Date: Wed, 4 Nov 2026 13:21:41 -0800 Subject: [PATCH 1/4] Use production endpoint in Socket Mode sample Remove the sample's Canary override and obsolete Canary/Pilot1 availability guidance while retaining the configurable negotiation endpoint API. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- samples/SocketModeBot/Program.cs | 7 +------ samples/SocketModeBot/README.md | 2 +- src/Microsoft.Teams.Apps/README.md | 3 --- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/samples/SocketModeBot/Program.cs b/samples/SocketModeBot/Program.cs index d6607315..c2048cd7 100644 --- a/samples/SocketModeBot/Program.cs +++ b/samples/SocketModeBot/Program.cs @@ -7,12 +7,7 @@ // Socket Mode receives activities over an outbound WebSocket, so the bot runs on a // generic host with no web server and no public messaging endpoint. HostApplicationBuilder builder = Host.CreateApplicationBuilder(args); -builder.Services.AddTeamsBotApplication(options => options.UseSocketMode(socket => -{ - // Socket Mode is only available on the Canary and Pilot1 rings for now. - // Pilot1 (https://pilot1.botapi.skype.com) is supported as well. - socket.NegotiateBaseUrl = new Uri("https://canary.botapi.skype.com"); -})); +builder.Services.AddTeamsBotApplication(options => options.UseSocketMode()); IHost host = builder.Build(); TeamsBotApplication teamsApp = host.UseTeamsBotApplication(); diff --git a/samples/SocketModeBot/README.md b/samples/SocketModeBot/README.md index 301063c9..156dedd1 100644 --- a/samples/SocketModeBot/README.md +++ b/samples/SocketModeBot/README.md @@ -9,7 +9,7 @@ This sample is an echo bot that receives activities over Socket Mode instead of ## What it shows -- `UseSocketMode(...)` on `AddTeamsBotApplication` to receive activities over Socket Mode, with `NegotiateBaseUrl` set to the canary ring. Socket Mode is currently only available on the Canary (`https://canary.botapi.skype.com`) and Pilot1 (`https://pilot1.botapi.skype.com`) rings. +- `UseSocketMode()` on `AddTeamsBotApplication` to receive activities over Socket Mode using the default production endpoint (`https://botapi.skype.com`). - `$(NoWarn);ExperimentalTeamsSocketMode` in the project file, because Socket Mode is experimental. - A generic host (`Host.CreateApplicationBuilder`) with no web server, and `UseTeamsBotApplication()` to get the app. diff --git a/src/Microsoft.Teams.Apps/README.md b/src/Microsoft.Teams.Apps/README.md index 8bbdf6d8..3e04a5bd 100644 --- a/src/Microsoft.Teams.Apps/README.md +++ b/src/Microsoft.Teams.Apps/README.md @@ -221,9 +221,6 @@ host.Run(); - **Public cloud only** — Registration fails for bots configured for another cloud. - **Classic bot identity only** — The connection is negotiated with the bot's app ID and credentials. Agentic identities are not supported. -- **Canary and Pilot1 endpoints** — Socket Mode is currently available only on the Canary and Pilot1 rings. Set - `NegotiateBaseUrl` to `https://canary.botapi.skype.com` or `https://pilot1.botapi.skype.com` until it is enabled on - the default production endpoint. - **Rejected credentials are not retried** — If negotiation returns HTTP 401 or 403, startup fails immediately. After startup, the affected geo stops reconnecting until the app restarts. - **Throttling respects the service** — On HTTP 429, the service's `Retry-After` delay takes precedence over From b9acbf85a37d3f0170d5b81150385797c43e8995 Mon Sep 17 00:00:00 2001 From: Teddy Arida-Moody Date: Wed, 4 Nov 2026 17:07:31 -0800 Subject: [PATCH 2/4] Clarify Socket Mode overrides and new-bot recommendation Document endpoint and geo overrides and recommend newly created bots while noting existing bots may require additional configuration. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- samples/SocketModeBot/Program.cs | 2 ++ src/Microsoft.Teams.Apps/SocketMode/SocketModeOptions.cs | 5 +++-- src/Microsoft.Teams.Apps/TeamsBotApplicationOptions.cs | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/samples/SocketModeBot/Program.cs b/samples/SocketModeBot/Program.cs index c2048cd7..4504f0ff 100644 --- a/samples/SocketModeBot/Program.cs +++ b/samples/SocketModeBot/Program.cs @@ -6,6 +6,8 @@ // Socket Mode receives activities over an outbound WebSocket, so the bot runs on a // generic host with no web server and no public messaging endpoint. +// Socket Mode is recommended for newly created bots; existing bots may require +// additional configuration. HostApplicationBuilder builder = Host.CreateApplicationBuilder(args); builder.Services.AddTeamsBotApplication(options => options.UseSocketMode()); IHost host = builder.Build(); diff --git a/src/Microsoft.Teams.Apps/SocketMode/SocketModeOptions.cs b/src/Microsoft.Teams.Apps/SocketMode/SocketModeOptions.cs index d5e16517..1a8b3e4b 100644 --- a/src/Microsoft.Teams.Apps/SocketMode/SocketModeOptions.cs +++ b/src/Microsoft.Teams.Apps/SocketMode/SocketModeOptions.cs @@ -14,19 +14,20 @@ namespace Microsoft.Teams.Apps.SocketMode; /// It is supported only in the public cloud, and runs on a host without a web server /// (Host.CreateApplicationBuilder). Settings are validated when the host starts. /// Socket Mode is experimental: the API is in preview and may change, and it is recommended only for developing agents. +/// Socket Mode is recommended for newly created bots; existing bots may require additional configuration. /// [Experimental("ExperimentalTeamsSocketMode")] public sealed class SocketModeOptions { /// /// Gets or sets the base URL used to negotiate each geo connection. Must use HTTPS unless it targets loopback. - /// Defaults to https://botapi.skype.com. + /// Defaults to https://botapi.skype.com. Override this to target a different Teams backend service ring. /// public Uri NegotiateBaseUrl { get; set; } = new(SocketModeProtocol.DefaultNegotiateBaseUrl); /// /// Gets or sets the geos to connect, one connection each. An empty string connects to the base URL without a geo - /// segment. Defaults to amer, emea, and apac. + /// segment. Defaults to amer, emea, and apac. Override this to connect to a different set of geos. /// public IReadOnlyList Geos { get; set; } = SocketModeProtocol.DefaultGeos; diff --git a/src/Microsoft.Teams.Apps/TeamsBotApplicationOptions.cs b/src/Microsoft.Teams.Apps/TeamsBotApplicationOptions.cs index 41d30795..47432c82 100644 --- a/src/Microsoft.Teams.Apps/TeamsBotApplicationOptions.cs +++ b/src/Microsoft.Teams.Apps/TeamsBotApplicationOptions.cs @@ -75,6 +75,7 @@ public TeamsBotApplicationOptions UseState(Action? configure = /// get the app with host.UseTeamsBotApplication(). Passing clears any earlier Socket /// Mode configuration, so the bot receives activities over HTTP. Socket Mode is experimental: the API is in preview /// and may change, and it is recommended only for developing agents. + /// Socket Mode is recommended for newly created bots; existing bots may require additional configuration. /// /// Whether to receive activities over Socket Mode. Default is . /// This instance for chaining. @@ -94,6 +95,7 @@ public TeamsBotApplicationOptions UseSocketMode(bool enabled = true) /// Supported only in the public cloud. Build the bot with Host.CreateApplicationBuilder() (no web server) and /// get the app with host.UseTeamsBotApplication(). Socket Mode is experimental: the API is in preview and may /// change, and it is recommended only for developing agents. + /// Socket Mode is recommended for newly created bots; existing bots may require additional configuration. /// /// Delegate to configure . /// This instance for chaining. From 43db1d75389b7423f9ea1641ae2de366d3f786bb Mon Sep 17 00:00:00 2001 From: Teddy Arida-Moody Date: Wed, 4 Nov 2026 17:36:05 -0800 Subject: [PATCH 3/4] Simplify Socket Mode new-bot wording Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- samples/SocketModeBot/Program.cs | 2 +- src/Microsoft.Teams.Apps/SocketMode/SocketModeOptions.cs | 2 +- src/Microsoft.Teams.Apps/TeamsBotApplicationOptions.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/SocketModeBot/Program.cs b/samples/SocketModeBot/Program.cs index 4504f0ff..b0eda833 100644 --- a/samples/SocketModeBot/Program.cs +++ b/samples/SocketModeBot/Program.cs @@ -6,7 +6,7 @@ // Socket Mode receives activities over an outbound WebSocket, so the bot runs on a // generic host with no web server and no public messaging endpoint. -// Socket Mode is recommended for newly created bots; existing bots may require +// Socket Mode is recommended for new bots; existing bots may require // additional configuration. HostApplicationBuilder builder = Host.CreateApplicationBuilder(args); builder.Services.AddTeamsBotApplication(options => options.UseSocketMode()); diff --git a/src/Microsoft.Teams.Apps/SocketMode/SocketModeOptions.cs b/src/Microsoft.Teams.Apps/SocketMode/SocketModeOptions.cs index 1a8b3e4b..fe8a0091 100644 --- a/src/Microsoft.Teams.Apps/SocketMode/SocketModeOptions.cs +++ b/src/Microsoft.Teams.Apps/SocketMode/SocketModeOptions.cs @@ -14,7 +14,7 @@ namespace Microsoft.Teams.Apps.SocketMode; /// It is supported only in the public cloud, and runs on a host without a web server /// (Host.CreateApplicationBuilder). Settings are validated when the host starts. /// Socket Mode is experimental: the API is in preview and may change, and it is recommended only for developing agents. -/// Socket Mode is recommended for newly created bots; existing bots may require additional configuration. +/// Socket Mode is recommended for new bots; existing bots may require additional configuration. /// [Experimental("ExperimentalTeamsSocketMode")] public sealed class SocketModeOptions diff --git a/src/Microsoft.Teams.Apps/TeamsBotApplicationOptions.cs b/src/Microsoft.Teams.Apps/TeamsBotApplicationOptions.cs index 47432c82..435ccec0 100644 --- a/src/Microsoft.Teams.Apps/TeamsBotApplicationOptions.cs +++ b/src/Microsoft.Teams.Apps/TeamsBotApplicationOptions.cs @@ -75,7 +75,7 @@ public TeamsBotApplicationOptions UseState(Action? configure = /// get the app with host.UseTeamsBotApplication(). Passing clears any earlier Socket /// Mode configuration, so the bot receives activities over HTTP. Socket Mode is experimental: the API is in preview /// and may change, and it is recommended only for developing agents. - /// Socket Mode is recommended for newly created bots; existing bots may require additional configuration. + /// Socket Mode is recommended for new bots; existing bots may require additional configuration. /// /// Whether to receive activities over Socket Mode. Default is . /// This instance for chaining. @@ -95,7 +95,7 @@ public TeamsBotApplicationOptions UseSocketMode(bool enabled = true) /// Supported only in the public cloud. Build the bot with Host.CreateApplicationBuilder() (no web server) and /// get the app with host.UseTeamsBotApplication(). Socket Mode is experimental: the API is in preview and may /// change, and it is recommended only for developing agents. - /// Socket Mode is recommended for newly created bots; existing bots may require additional configuration. + /// Socket Mode is recommended for new bots; existing bots may require additional configuration. /// /// Delegate to configure . /// This instance for chaining. From 297d91e304c883250bd2d3f0a88e1eeb76833c24 Mon Sep 17 00:00:00 2001 From: Teddy Arida-Moody Date: Thu, 5 Nov 2026 09:51:22 -0800 Subject: [PATCH 4/4] Clarify Socket Mode availability for new bots Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- samples/SocketModeBot/Program.cs | 3 +-- src/Microsoft.Teams.Apps/SocketMode/SocketModeOptions.cs | 2 +- src/Microsoft.Teams.Apps/TeamsBotApplicationOptions.cs | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/samples/SocketModeBot/Program.cs b/samples/SocketModeBot/Program.cs index 7a981a9f..032137a5 100644 --- a/samples/SocketModeBot/Program.cs +++ b/samples/SocketModeBot/Program.cs @@ -9,8 +9,7 @@ // Socket Mode receives activities over an outbound WebSocket, so the bot runs on a // generic host with no web server and no public messaging endpoint. -// Socket Mode is recommended for new bots; existing bots may require -// additional configuration. +// Socket Mode is currently only available for new bots. HostApplicationBuilder builder = Host.CreateApplicationBuilder(new HostApplicationBuilderSettings { Args = args, diff --git a/src/Microsoft.Teams.Apps/SocketMode/SocketModeOptions.cs b/src/Microsoft.Teams.Apps/SocketMode/SocketModeOptions.cs index fe8a0091..afdac15b 100644 --- a/src/Microsoft.Teams.Apps/SocketMode/SocketModeOptions.cs +++ b/src/Microsoft.Teams.Apps/SocketMode/SocketModeOptions.cs @@ -14,7 +14,7 @@ namespace Microsoft.Teams.Apps.SocketMode; /// It is supported only in the public cloud, and runs on a host without a web server /// (Host.CreateApplicationBuilder). Settings are validated when the host starts. /// Socket Mode is experimental: the API is in preview and may change, and it is recommended only for developing agents. -/// Socket Mode is recommended for new bots; existing bots may require additional configuration. +/// Socket Mode is currently only available for new bots. /// [Experimental("ExperimentalTeamsSocketMode")] public sealed class SocketModeOptions diff --git a/src/Microsoft.Teams.Apps/TeamsBotApplicationOptions.cs b/src/Microsoft.Teams.Apps/TeamsBotApplicationOptions.cs index 435ccec0..007dc208 100644 --- a/src/Microsoft.Teams.Apps/TeamsBotApplicationOptions.cs +++ b/src/Microsoft.Teams.Apps/TeamsBotApplicationOptions.cs @@ -75,7 +75,7 @@ public TeamsBotApplicationOptions UseState(Action? configure = /// get the app with host.UseTeamsBotApplication(). Passing clears any earlier Socket /// Mode configuration, so the bot receives activities over HTTP. Socket Mode is experimental: the API is in preview /// and may change, and it is recommended only for developing agents. - /// Socket Mode is recommended for new bots; existing bots may require additional configuration. + /// Socket Mode is currently only available for new bots. /// /// Whether to receive activities over Socket Mode. Default is . /// This instance for chaining. @@ -95,7 +95,7 @@ public TeamsBotApplicationOptions UseSocketMode(bool enabled = true) /// Supported only in the public cloud. Build the bot with Host.CreateApplicationBuilder() (no web server) and /// get the app with host.UseTeamsBotApplication(). Socket Mode is experimental: the API is in preview and may /// change, and it is recommended only for developing agents. - /// Socket Mode is recommended for new bots; existing bots may require additional configuration. + /// Socket Mode is currently only available for new bots. /// /// Delegate to configure . /// This instance for chaining.