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:
-
Create or use a Dataverse environment with base language = Italian (it-IT).
-
Create a Copilot agent via Copilot Studio or via pac copilot create.
-
Run:
pac copilot publish \
--environment https://<yourorg>.crm4.dynamics.com \
--bot <BOT_SCHEMA_NAME>
-
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)
This happens because Dataverse returns the localized formatted value
"Pubblicato"for the Copilot agentstatuscode, 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:
Create or use a Dataverse environment with base language = Italian (
it-IT).Create a Copilot agent via Copilot Studio or via
pac copilot create.Run:
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)