Skip to content

Rename GetCognitiveServicesEndpoint to GetCognitiveServicesScope and return string#1714

Merged
jairmyree merged 3 commits intojairmyree/sov-cloud-no-multicloudfrom
copilot/sub-pr-1687-again
Feb 12, 2026
Merged

Rename GetCognitiveServicesEndpoint to GetCognitiveServicesScope and return string#1714
jairmyree merged 3 commits intojairmyree/sov-cloud-no-multicloudfrom
copilot/sub-pr-1687-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 12, 2026

Methods named GetCognitiveServicesEndpoint() were returning OAuth scopes (e.g., https://cognitiveservices.azure.com/.default), not endpoints. This was misleading and required unnecessary .ToString() conversions when passing to TokenRequestContext.

Changes

  • FastTranscriptionRecognizer.cs: Renamed GetCognitiveServicesEndpoint()GetCognitiveServicesScope(), changed return type from Uri to string
  • RealtimeTranscriptionRecognizer.cs: Changed GetCognitiveServicesScope() return type from Uri to string for consistency
  • RealtimeTtsSynthesizer.cs: Updated to use non-obsolete GetCognitiveServicesScope() method

Before/After

// Before
var tokenRequestContext = new TokenRequestContext([GetCognitiveServicesEndpoint().ToString()]);

// After
var tokenRequestContext = new TokenRequestContext([GetCognitiveServicesScope()]);

This naming now correctly reflects the method's purpose and eliminates unnecessary type conversions across all Speech tool components.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits February 12, 2026 16:23
…astTranscriptionRecognizer

Co-authored-by: jairmyree <67484440+jairmyree@users.noreply.github.com>
…urn type

Co-authored-by: jairmyree <67484440+jairmyree@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Sovereign Cloud support specific updates Rename GetCognitiveServicesEndpoint to GetCognitiveServicesScope and return string Feb 12, 2026
Copilot AI requested a review from jairmyree February 12, 2026 16:29
@jairmyree jairmyree marked this pull request as ready for review February 12, 2026 21:28
@jairmyree jairmyree requested review from a team and JonathanCrd as code owners February 12, 2026 21:28
@jairmyree jairmyree requested review from hallipr, msalaman, saikoumudi, vukelich and xiangyan99 and removed request for a team February 12, 2026 21:28
@jairmyree jairmyree merged commit 7b795b1 into jairmyree/sov-cloud-no-multicloud Feb 12, 2026
3 checks passed
@github-project-automation github-project-automation bot moved this from Untriaged to Done in Azure MCP Server Feb 12, 2026
@jairmyree jairmyree deleted the copilot/sub-pr-1687-again branch February 12, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants