"gatewaySetting" is serialized incorrectly inside "connectionParameterSets"
- Dominant language
- TypeScript
- Stars
- 111
- Forks
- 109
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 20
Description
### Severity
P2 - High (Major functionality broken)
### Describe the Bug with repro steps
## Expected Behavior
When a selected parameter set contains `gatewaySetting`, LogicAppsUX should serialize it using the gateway-compatible `connectionParameters` shape, or the gateway connection API should accept the `connectionParametersSet` representation.
## Actual Behavior
A custom connector using `connectionParameterSets` cannot create an on-premises gateway connection because the selected gateway parameters are serialized as `connectionParametersSet` values.
## Reproduction
Define a parameter set containing `authType` and `gatewaySetting`:
```json
{
"name": "gateway-noauth",
"uiDefinition": {
"displayName": "Gateway",
"description": "Connect through the on-premises gateway."
},
"parameters": {
"authType": {
"type": "string",
"uiDefinition": {
"displayName": "Authentication Type",
"description": "No authentication",
"constraints": {
"required": "true",
"allowedValues": [
{
"text": "No authentication",
"value": "anonymous"
}
]
}
}
},
"gateway": {
"type": "gatewaySetting",
"gatewaySettings": {
"dataSourceType": "CustomConnector",
"connectionDetails": []
},
"uiDefinition": {
"displayName": "Gateway",
"description": "Select a gateway.",
"constraints": {
"required": "true",
"capability": ["gateway"]
}
}
}
}
}
```
## Actual Payload
LogicAppsUX submits:
```json
{
"properties": {
"connectionParametersSet": {
"name": "gateway-noauth",
"values": {
"authType": {
"value": "anonymous"
},
"gateway": {
"value": {
"id": "/providers/Microsoft.PowerApps/gatewayClusters/"
}
}
}
}
}
}
```
The request fails with:
```text
The 'authType' connection parameter is null or invalid for the on-premise connection request.
```
## Working Payload
The Power Platform custom connector wizard creates successful gateway connections using:
```json
{
"properties": {
"connectionParameters": {
"authType": "anonymous",
"gateway": {
"id": "/providers/Microsoft.PowerApps/gatewayClusters/"
}
}
}
}
```
## Relevant Code
```text
libs/designer-v2/src/lib/ui/panel/connectionsPanel/createConnection/createConnectionInternal.tsx
```
The current parameter-set serializer wraps every parameter in a `value` object:
```ts
values: Object.fromEntries(
Object.keys(filteredParameterValues).map((key) => [
key,
{ value: filteredParameterValues[key] },
])
)
```
This serialization is incompatible with the gateway connection API's expected flat `connectionParameters` contract.
### What type of Logic App Is this happening in?
Standard (Portal)
### Are you experiencing a regression?
_No response_
### Which operating system are you using?
Windows
### Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg
Yes
### Workflow JSON
```json
```
### Screenshots or Videos
_No response_
### Environment
- Microsoft Power Automate
- Custom connector deployed with `paconn`
- Microsoft on-premises data gateway, standard mode
### Additional context
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.