Skip to content

README: Missing critical steps for local testing with Agents Playground (Copilot Studio Node.js sample) #230

@keshavk-msft

Description

@keshavk-msft

Description

Problem

The README's "Testing" section for the Copilot Studio Node.js sample agent only says:

npm run test-tool

I followed all the steps documented in the README — installed dependencies, configured .env, set up Copilot Studio, added CopilotStudio.Copilots.Invoke API permission, granted user access, and configured agentic authentication — but local testing with the Agents Playground fails with:

AADSTS82008: All agentic applications requesting a token exchange token must include the fmipath parameter on the token request.
Image

The playground shows: "Error communicating with Copilot Studio: Failed to acquire token for Copilot Studio. User may need to sign in."

Expected behavior

In agent playground it should give auth popup and then start responding.

SDK Version

a365 v1.1.94-preview @microsoft/agents-hosting ^1.2.2

Language/Runtime

Node.js 20.20.0

OS

Windows

How to Reproduce

Steps to Reproduce

  1. Clone the repo and navigate to copilot-studio-node/sample-agent

  2. Install dependencies:

    PS> npm install
    found 0 vulnerabilities
    
  3. Initialize config:

    PS> a365 config init
    Subscription ID: 5448407e-xxxx-xxxx-xxxx-xxxxxxxxxxxx (M365CPI159633580 - Subscription)
    Tenant ID: ea4b3b3d-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    
  4. Configure .env with Copilot Studio environment ID, agent identifier, and service connection credentials (clientId, clientSecret, tenantId)(service connection credentials filled by a365 config init also added CopilotStudio.Copilots.Invoke permission in Azure Portal and Granted the admin permission as documented in README ,Copilot Studio agent is shared within the organization)

  5. Run full setup:

    PS> a365 setup all
    Starting setup all 
    Agent 365 Setup
    Running all setup steps..
    
  6. Run local test:

    PS> npm run test-tool
    
  7. Send any message (e.g., "hi") in the Agents Playground at localhost:56150

Expected: Agent forwards message to Copilot Studio and returns a response.

Actual: Returns AADSTS82008 error. The token request sends fmi_path= (empty) because the agentic identity was never provisioned. The AgenticAppId in a365.generated.config.json is null.

Output

No response

Screenshots

No response

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions