In createUiDefinition.json the Microsoft.Common.ServicePrincipalSelector type only accepts true or false for the visible property, not a variable boolean like other types
Bryce Barrick
1
Reputation point
If I put in a variable boolean in the visible field it does not resolve the expression properly, it seems to just revert to the default true. Here is an easily verifiable example:
{
"$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#",
"handler": "Microsoft.Azure.CreateUIDef",
"version": "0.1.2-preview",
"parameters": {
"config": {},
"basics": [],
"steps": [
{
"name": "visibilityTest",
"label": "visibilityTest",
"elements": [
{
"name": "enableVis",
"type": "Microsoft.Common.CheckBox",
"label": "Toggle SP Selector Visibility",
"constraints": {
"required": false
}
},
{
"name": "SPSelector",
"type": "Microsoft.Common.ServicePrincipalSelector",
"label": {
"password": "Leave Blank",
"certificateThumbprint": "Certificate thumbprint",
"authenticationType": "Choose Password",
"sectionHeader": "Leave this section as default"
},
"defaultValue": {},
"options": {
"hideCertificate": true
},
"visible": "[equals(steps('visibilityTest').enableVis, true)]"
}
]
}
],
"outputs": {}
}
}
The only thing that will hide the ServicePrincipalSelector is the value false. Every other attempt to hide it based on an expression causes it to be visible. Please advise if I am doing something wrong or if a fix can be made.
Azure Managed Applications
Azure Managed Applications
An Azure service that enables managed service providers, independent software vendors, and enterprise IT teams to deliver turnkey solutions through the Azure Marketplace or service catalog.
Sign in to answer