Skip to content

pac copilot publish fails in non-English Dataverse environments #1282

@esskidri

Description

@esskidri

This happens because Dataverse returns the localized formatted value "Pubblicato" for the Copilot agent statuscode, but the Power Platform CLI expects the English value "Published" when parsing status enums.

As a result, publishing Copilot agents via CLI is impossible in non-English environments.


To Reproduce
Steps to reproduce the behavior:

  1. Create or use a Dataverse environment with base language = Italian (it-IT).

  2. Create a Copilot agent via Copilot Studio or via pac copilot create.

  3. Run:

    pac copilot publish \
      --environment https://<yourorg>.crm4.dynamics.com \
      --bot <BOT_SCHEMA_NAME>
    
  4. The CLI throws: Requested value 'Pubblicato' was not found.

Expected behavior
pac copilot publish should successfully publish the agent regardless of the Dataverse environment’s language.

Stack trace:

Requested value 'Pubblicato' was not found.
System.ArgumentException: Requested value 'Pubblicato' was not found.
at bolt.module.copilot.CopilotSummary..ctor(String name, Guid botId, String componentState, String isManaged, String statusCode, String stateCode, Nullable`1 solutionId)
at bolt.module.copilot.CopilotSummary.FromDictionary(...)
at bolt.module.copilot.verbs.CopilotPublishVerb.GetCopilots(...)
at bolt.module.copilot.verbs.CopilotPublishVerb.ExecuteAsync(...)

PC details :
• OS: macOS Sonoma (Apple Silicon)
• CLI Version: 1.50.1
• Tool: pac copilot publish
• Dataverse environment language: Italian (it-IT)
• User language: English (workaround attempted, not effective)
• Region: CRM4 (Europe)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions