microsoft / microsoft/Power-CAT-Copilot-Studio-Kit

Bug: Copilot Agent Kit Test Execution fails with EnvironmentGroupPolicyViolation despite Microsoft Authentication being configured

Open
#850 6 comments 0 reactions 1 assignee View on GitHub

@ranjith7022 is already working on this.

Since Aug 31, 2026.

bug
Dominant language
TypeScript
Stars
450
Forks
95
Avg merge
26m
Merged PRs (30d)
5

Description

Description

While configuring and testing the Copilot Agent Kit automated testing capability, I am encountering an EnvironmentGroupPolicyViolation error during test execution.

Environment
Copilot Agent Kit: Latest managed solution
Authentication Method: Microsoft Authentication
Agent Configuration populated with:
Agent Schema Name
Environment ID
Tenant ID
Client ID
Test automation now successfully generates the Direct Line token and starts execution.

Issue
The test execution completes authentication successfully but the agent response fails with the following message:
Sorry, something unexpected happened.
Error code: EnvironmentGroupPolicyViolation

Steps to reproduce

Create a Copilot Studio agent.
Configure an Agent Configuration record in Copilot Agent Kit.
Set User Authentication to Microsoft Authentication.
Populate:
Agent Schema Name
Environment ID
Tenant ID
Client ID
Create a test and execute it.
Test execution returns: EnvironmentGroupPolicyViolation

Expected behavior

The test framework should return either:

The actual agent response, or
A more detailed error identifying the specific governance policy, connector, or configuration causing the violation.

Actual behavior

Current Behaviour
Agent Configuration exists.
Direct Line token generation succeeds.
Test run starts.
Agent invocation returns EnvironmentGroupPolicyViolation.
Agent cannot complete the conversation.

Image
Environment

No response

Additional context or logs

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.