You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a Microsoft Foundry resource
(Microsoft.CognitiveServices/accounts with kind: AIServices) using Azure
CLI, the resource and its project appear correctly in the new Microsoft
Foundry experience at ai.azure.com.
However, when creating the exact same resource using Bicep, the portal
still shows the old "Azure AI Foundry" classic experience and prompts to
"Try the new Microsoft Foundry experience" — but the project never appears in
the dropdown.
Result: Resource deploys successfully (provisioningState: Succeeded), but
the new Foundry portal does NOT show the project. It still shows the classic
"Azure AI Foundry" experience with an "upgrade" prompt. ❌
Inspecting the Bicep-created resource via REST API shows:
Even though false and null are semantically equivalent for these properties,
it appears the Foundry portal filters on null vs explicit values.
Bicep uses ARM PUT (full resource replacement), which writes explicit
values for all specified properties. The CLI uses a different creation path
that leaves unset properties as null. Once these properties are set to
explicit values via Bicep's PUT, there is no way to reset them back to null — Azure's ARM layer persists the explicit values permanently.
What we tried
Removed networkAcls and restrictOutboundNetworkAccess from Bicep —
ARM PUT still sets restrictOutboundNetworkAccess: false (explicit) instead
of leaving it null.
Set restrictOutboundNetworkAccess: false explicitly — same result,
portal doesn't recognize it.
Used az cognitiveservices account update to try resetting values to
null — properties persist as explicit values.
Used az rest --method PATCH to try clearing networkAcls — Internal
Server Error or values persist.
Confirmed API version 2025-09-01 (latest GA that supports all resource
types including capabilityHosts).
Added networkInjections to the CLI-created resource via PATCH — it
still appears in the new portal, confirming networkInjections alone is NOT
the issue.
Workaround
We worked around this by creating the Foundry account and project via CLI in
our deployment script (before Bicep runs), then referencing them as existing
in Bicep for model deployments, connections, capability hosts, etc.:
# deploy.ps1 — Pre-Bicep step
az cognitiveservices account create --name $name--resource-group $rg--kind AIServices --sku s0 --location $location--allow-project-management
az cognitiveservices account update --name $name--resource-group $rg--custom-domain $subdomain
az cognitiveservices account project create --name $name--resource-group $rg--project-name $projectName--location $location# Then Bicep references them as existing:
// foundry.bicep — references CLI-created accountresourceaccount'Microsoft.CognitiveServices/accounts@2025-09-01'existing = {
name: foundryResourceName
}
// Model deployment, diagnostics, connections, capability host etc. work fine as child resourcesresourcemodelDeployment'Microsoft.CognitiveServices/accounts/deployments@2025-09-01' = {
parent: accountname: 'gpt-4o'// ...
}
Questions
Is this a known issue with the new Foundry portal filtering on explicit false vs null?
Is there a Bicep property or pattern that creates the resource in a way the
new portal recognizes?
Will this be fixed so Bicep-created resources are treated the same as
CLI/portal-created ones?
Is there a way to reset ARM properties back to null once they've been set
to explicit values?
Any tips or insights from anyone who has successfully deployed a new Foundry
experience resource purely via Bicep/ARM templates would be greatly
appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
When creating a Microsoft Foundry resource
(
Microsoft.CognitiveServices/accountswithkind: AIServices) using AzureCLI, the resource and its project appear correctly in the new Microsoft
Foundry experience at ai.azure.com.
However, when creating the exact same resource using Bicep, the portal
still shows the old "Azure AI Foundry" classic experience and prompts to
"Try the new Microsoft Foundry experience" — but the project never appears in
the dropdown.
Environment
2025-09-01(GA)swedencentralAIServicesS0What works ✅ — Azure CLI
Result: Resource + project appear in the new Foundry portal immediately. ✅
Inspecting the CLI-created resource via REST API shows:
{ "allowProjectManagement": true, "customSubDomainName": "my-foundry-resource", "disableLocalAuth": null, "publicNetworkAccess": "Enabled", "restrictOutboundNetworkAccess": null, "networkInjections": null, "networkAcls": null }What doesn't work ❌ — Bicep
Result: Resource deploys successfully (
provisioningState: Succeeded), butthe new Foundry portal does NOT show the project. It still shows the classic
"Azure AI Foundry" experience with an "upgrade" prompt. ❌
Inspecting the Bicep-created resource via REST API shows:
{ "allowProjectManagement": true, "customSubDomainName": "my-foundry-resource", "disableLocalAuth": false, "publicNetworkAccess": "Enabled", "restrictOutboundNetworkAccess": false, "networkAcls": { "bypass": "AzureServices", "defaultAction": "Allow", "ipRules": [], "virtualNetworkRules": [] } }Root cause analysis
We did a side-by-side comparison of the ARM properties between the CLI-created
and Bicep-created resources. The key difference:
disableLocalAuthnullfalserestrictOutboundNetworkAccessnullfalsenetworkAclsnull{ bypass: "AzureServices", defaultAction: "Allow" }Even though
falseandnullare semantically equivalent for these properties,it appears the Foundry portal filters on
nullvs explicit values.Bicep uses ARM
PUT(full resource replacement), which writes explicitvalues for all specified properties. The CLI uses a different creation path
that leaves unset properties as
null. Once these properties are set toexplicit values via Bicep's PUT, there is no way to reset them back to
null— Azure's ARM layer persists the explicit values permanently.What we tried
networkAclsandrestrictOutboundNetworkAccessfrom Bicep —ARM PUT still sets
restrictOutboundNetworkAccess: false(explicit) insteadof leaving it
null.restrictOutboundNetworkAccess: falseexplicitly — same result,portal doesn't recognize it.
az cognitiveservices account updateto try resetting values tonull — properties persist as explicit values.
az rest --method PATCHto try clearingnetworkAcls— InternalServer Error or values persist.
2025-09-01(latest GA that supports all resourcetypes including
capabilityHosts).microsoft-foundry/foundry-samples
— our Bicep structure matches exactly.
networkInjectionsto the CLI-created resource via PATCH — itstill appears in the new portal, confirming
networkInjectionsalone is NOTthe issue.
Workaround
We worked around this by creating the Foundry account and project via CLI in
our deployment script (before Bicep runs), then referencing them as
existingin Bicep for model deployments, connections, capability hosts, etc.:
Questions
falsevsnull?new portal recognizes?
CLI/portal-created ones?
nullonce they've been setto explicit values?
Any tips or insights from anyone who has successfully deployed a new Foundry
experience resource purely via Bicep/ARM templates would be greatly
appreciated.
Tags:
azure,azure-ai-foundry,azure-bicep,microsoft-foundry,azure-resource-managerBeta Was this translation helpful? Give feedback.
All reactions