Skip to content

Conversation

@MattB-msft
Copy link
Member

This pull request updates the token acquisition logic in all Copilot Studio sample clients to dynamically determine the required authentication scopes based on the provided connection settings, rather than using a hardcoded default scope. This change improves flexibility and ensures the correct scopes are used for each environment.

Authentication scope determination:

  • Updated the acquireToken functions in copilotstudio-client, copilotstudio-webchat-react, and copilotstudio-webclient samples to use CopilotStudioClient.scopeFromSettings(settings) to dynamically set the scopes parameter when requesting tokens, replacing the previous hardcoded https://api.powerplatform.com/.default scope. [1] [2] F952c658L16R16)
  • Added imports for CopilotStudioClient in the relevant files to enable dynamic scope resolution. [1] [2]

@github-actions github-actions bot added the Samples Changes to Samples label Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Samples Changes to Samples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants