Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The SubscriptionSelector user-interface (UI) element lets users select an Azure subscription. It's the standalone subscription picker used when a form doesn't use the composite Microsoft.Common.ResourceScope element.
UI sample
The SubscriptionSelector element renders a subscription dropdown.
Schema
{
"name": "subscription",
"type": "Microsoft.Common.SubscriptionSelector",
"resourceProviders": [
"Microsoft.Storage",
"Microsoft.Network"
],
"constraints": {
"validations": [
{
"isValid": "[not(empty(steps('basics').subscription.subscriptionId))]",
"message": "Select a subscription."
}
]
},
"visible": true
}
Sample output
{
"displayName": "Contoso subscription",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"tenantId": "11111111-1111-1111-1111-111111111111"
}
Remarks
resourceProvidersfilters selectable subscriptions to subscriptions where the listed providers are available.constraints.validationsadds custom validation rules.- Reference the subscription ID with
[steps('basics').subscription.subscriptionId]. - Standalone
Microsoft.Common.ResourceGroupSelector,Microsoft.Common.LocationSelector, and scope-aware resource controls should reference the selected subscription through theirscope.subscriptionIdproperty.