Skip to content

CopilotStudio Client WebChat sample failure when cloud is not set #434

@rido-min

Description

@rido-min

Following the README for the copilotstudio-webchat sample

2. Fill in the values you recorded during setup:
- `environmentId`: The Copilot Studio Environment Id.
- `agentIdentifier`: The Copilot Studio Schema name.
- `tenantId`: The App Registration Directory (tenant) ID.
- `appClientId`: The App Registration Application (client) ID.

I got the next error when trying to acquire the token

index.js:29  Failed to initialize: Error: Invalid cluster category value: -1
    at Qi (powerPlatformEnvironment.ts:263:13)
    at He.Qf [as scopeFromSettings] (powerPlatformEnvironment.ts:150:23)
    at acquireToken (acquireToken.js:18:34)
    at async index.js:15:17
(anonymous) @ index.js:29

I was able to fix the issue by setting the cloud to 5, seems like an issue introduced in #415

Can we provide a default value for cloud? or at least update the README to indicate the required settings

We should also verify scopeFromSettings works with directUrl

Metadata

Metadata

Assignees

Labels

BugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions