microsoft / powerplatform-build-tools

Power Platform Build Tools automate common build and deployment tasks related to Power Platform. This includes synchronization of solution metadata (a.k.a. solutions) between development environments and source control, generating build artifacts, deploying to downstream environments, provisioning/de-provisioning of environments, and the ability to perform static analysis checks against your solution using the PowerApps checker service.
MIT License
174 stars 37 forks source link

pac connector connectorId expects guid in stead of string #823

Open remyblok opened 2 months ago

remyblok commented 2 months ago

Hello.

The pac connector commands work with a settings.json file. The settings file schema is defined here and explained here as part of the paconn tooling.

The connectorId is defined as a string. The pac connector command expect a guid in stead. When a string is used pac shows the following: Error: The value passed to '--settings-file' is invalid. The Settings file is not in the expected format.

This is a bug, since a guid as connectorId does not follow the settings file definition. This also breaks compatibility with the paconn tooling that does use and generate a string formatted connectorId.

Also when using the pac connector command with the --connector-id paramerater is stead of a settings file, the following is show: Error: Argument --connector-id value is incorrect: The Connector ID must be a valid Guid. This also breaks compatibility with the paconn tooling that can use a string as Connector ID.

This is a valid settings.json file and should be accepted by the pac connector commands:

{
  "connectorId": "shared_my-20new-20connector-5f9450320e4374a68-5f0286e043ca7da361",
  "environment": "4097feb1-8dc1-f7f6-b484-9955fc12995a",
  "apiProperties": "apiProperties.json",
  "apiDefinition": "apiDefinition.json",
  "icon": "icon.png",
  "script": "script.csx"
}

Can this please be fixed in the pac tool in order to create compatibility with the paconn tooling. Thanks!