Skip to content

Require explicit serviceUrl for Core activity APIs#601

Open
heyitsaamir wants to merge 3 commits into
core/api-flattenfrom
heyitsaamir-conversation-api-impact
Open

Require explicit serviceUrl for Core activity APIs#601
heyitsaamir wants to merge 3 commits into
core/api-flattenfrom
heyitsaamir-conversation-api-impact

Conversation

@heyitsaamir

Copy link
Copy Markdown
Collaborator

Summary

Make Core ConversationClient activity operations take an explicit Uri serviceUrl instead of deriving it from CoreActivity.ServiceUrl.

This unifies the pattern across Core, Compat, TeamsApps, and the other language SDKs. It removes the awkward behavior where some APIs derived routing information from CoreActivity, while others required it explicitly. Values like serviceUrl come from the inbound activity and act as SDK signals for which URL to call for the outbound request; they are not meant to be properties of the outbound activity itself.

Changes

  • Updated SendActivityAsync, UpdateActivityAsync, UpdateTargetedActivityAsync, and DeleteActivityAsync(string, CoreActivity, ...) to require serviceUrl.
  • Stopped mutating outbound activities just to populate ServiceUrl in app/API/BotBuilder wrapper paths.
  • Updated tests, samples, and mocks for the breaking signature change.

This PR includes breaking changes in Core. Since Core is still in preview, we believe this is the right time to make the change.

Validation

  • dotnet test core/test/Microsoft.Teams.Core.UnitTests/Microsoft.Teams.Core.UnitTests.csproj
  • dotnet test core/test/Microsoft.Teams.Apps.UnitTests/Microsoft.Teams.Apps.UnitTests.csproj
  • dotnet test core/test/Microsoft.Teams.Apps.BotBuilder.UnitTests/Microsoft.Teams.Apps.BotBuilder.UnitTests.csproj
  • dotnet build Microsoft.Teams.sln --no-restore --verbosity minimal

heyitsaamir and others added 3 commits July 10, 2026 15:47
Make Core ConversationClient activity operations take an explicit serviceUrl instead of deriving routing information from CoreActivity.ServiceUrl.

Update app, BotBuilder, streaming, tests, and samples to pass service URLs explicitly without mutating outbound activities for routing.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant