I have followed the following guide: https://github.com/microsoft-foundry/foundry-samples/tree/main/infrastructure/infrastructure-setup-bicep/01-connections/apim and did not encounter any errors (See below logs) however when I go to the foundry portal and click on the created connection, I get the following error: An error occurred.
Sorry, it looks like the page you're trying to access isn't available right now. You can try reloading the page, or come back later to see if the issue persists.
All error details are logged and triaged when possible.
`az deployment group create
--resource-group rg-prod-use-ai
--template-file connection-apim.bicep
--parameters parameters-static-models.json
/mnt/c/Users/alvin/Desktop/FC/foundry-bicep/modules/apim-connection-common.bicep(83,15) : Warning BCP036: The property "authType" expected a value of type "'AAD' | 'AccessKey' | 'AccountKey' | 'ApiKey' | 'CustomKeys' | 'ManagedIdentity' | 'None' | 'OAuth2' | 'PAT' | 'SAS' | 'ServicePrincipal' | 'UsernamePassword'" but the provided value is of type "'ProjectManagedIdentity'". If this is a resource type definition inaccuracy, report it using https://aka.ms/bicep-type-issues. [https://aka.ms/bicep/core-diagnostics#BCP036]
{
"id": "/subscriptions/11be4bd6-d890-421b-85aa-9d4c9c612545/resourceGroups/rg-prod-use-ai/providers/Microsoft.Resources/deployments/connection-apim",
"location": null,
"name": "connection-apim",
"properties": {
"correlationId": "069e1664-58d4-44a7-884c-775125e78258",
"debugSetting": null,
"dependencies": [],
"diagnostics": null,
"duration": "PT7.0671926S",
"error": null,
"extensions": [],
"mode": "Incremental",
"onErrorDeployment": null,
"outputResources": [
{
"apiVersion": null,
"extension": null,
"id": "/subscriptions/11be4bd6-d890-421b-85aa-9d4c9c612545/resourceGroups/rg-prod-use-ai/providers/Microsoft.CognitiveServices/accounts/foundry-prod-use-ai/projects/proj-default/connections/connection-bicep2",
"identifiers": null,
"resourceGroup": "rg-prod-use-ai",
"resourceType": "Microsoft.CognitiveServices/accounts/projects/connections"
}
],
"outputs": {
"authType": {
"type": "String",
"value": "ProjectManagedIdentity"
},
"connectionName": {
"type": "String",
"value": "connection-bicep2"
},
"hasCustomHeaders": {
"type": "Bool",
"value": false
},
"hasModelDiscovery": {
"type": "Bool",
"value": false
},
"hasStaticModels": {
"type": "Bool",
"value": true
},
"metadata": {
"type": "Object",
"value": {
"deploymentInPath": "false",
"models": "[{"name":"gpt-5.2","properties":{"model":{"name":"gpt-5.2","version":"2025-12-11","format":"OpenAI"}}}]"
}
}
},
"parameters": {
"apiName": {
"type": "String",
"value": "loadbalancefoundry"
},
"apimResourceId": {
"type": "String",
"value": "/subscriptions/11be4bd6-d890-421b-85aa-9d4c9c612545/resourceGroups/rg-prod-use-ai/providers/Microsoft.ApiManagement/service/apim-cockpit-ava-dev01"
},
"apimSubscriptionName": {
"type": "String",
"value": "master"
},
"authConfig": {
"type": "Object",
"value": {}
},
"authType": {
"type": "String",
"value": "ProjectManagedIdentity"
},
"connectionName": {
"type": "String",
"value": "connection-bicep2"
},
"customHeaders": {
"type": "Object",
"value": {}
},
"deploymentAPIVersion": {
"type": "String",
"value": ""
},
"deploymentInPath": {
"type": "String",
"value": "false"
},
"deploymentProvider": {
"type": "String",
"value": ""
},
"getModelEndpoint": {
"type": "String",
"value": ""
},
"inferenceAPIVersion": {
"type": "String",
"value": ""
},
"isSharedToAll": {
"type": "Bool",
"value": false
},
"listModelsEndpoint": {
"type": "String",
"value": ""
},
"projectResourceId": {
"type": "String",
"value": "/subscriptions/11be4bd6-d890-421b-85aa-9d4c9c612545/resourceGroups/rg-prod-use-ai/providers/Microsoft.CognitiveServices/accounts/foundry-prod-use-ai/projects/proj-default"
},
"staticModels": {
"type": "Array",
"value": [
{
"name": "gpt-5.2",
"properties": {
"model": {
"format": "OpenAI",
"name": "gpt-5.2",
"version": "2025-12-11"
}
}
}
]
}
},
"parametersLink": null,
"providers": [
{
"id": null,
"namespace": "Microsoft.Resources",
"providerAuthorizationConsentState": null,
"registrationPolicy": null,
"registrationState": null,
"resourceTypes": [
{
"aliases": null,
"apiProfiles": null,
"apiVersions": null,
"capabilities": null,
"defaultApiVersion": null,
"locationMappings": null,
"locations": [
null
],
"properties": null,
"resourceType": "deployments",
"zoneMappings": null
}
]
}
],
"provisioningState": "Succeeded",
"templateHash": "12847655066454575982",
"templateLink": null,
"timestamp": "2026-05-25T08:44:25.645661+00:00",
"validatedResources": null,
"validationLevel": null
},
"resourceGroup": "rg-prod-use-ai",
"tags": null,
"type": "Microsoft.Resources/deployments"
}`
I have followed the following guide: https://github.com/microsoft-foundry/foundry-samples/tree/main/infrastructure/infrastructure-setup-bicep/01-connections/apim and did not encounter any errors (See below logs) however when I go to the foundry portal and click on the created connection, I get the following error: An error occurred.
Sorry, it looks like the page you're trying to access isn't available right now. You can try reloading the page, or come back later to see if the issue persists.
All error details are logged and triaged when possible.
`az deployment group create
--resource-group rg-prod-use-ai
--template-file connection-apim.bicep
--parameters parameters-static-models.json
/mnt/c/Users/alvin/Desktop/FC/foundry-bicep/modules/apim-connection-common.bicep(83,15) : Warning BCP036: The property "authType" expected a value of type "'AAD' | 'AccessKey' | 'AccountKey' | 'ApiKey' | 'CustomKeys' | 'ManagedIdentity' | 'None' | 'OAuth2' | 'PAT' | 'SAS' | 'ServicePrincipal' | 'UsernamePassword'" but the provided value is of type "'ProjectManagedIdentity'". If this is a resource type definition inaccuracy, report it using https://aka.ms/bicep-type-issues. [https://aka.ms/bicep/core-diagnostics#BCP036]
{
"id": "/subscriptions/11be4bd6-d890-421b-85aa-9d4c9c612545/resourceGroups/rg-prod-use-ai/providers/Microsoft.Resources/deployments/connection-apim",
"location": null,
"name": "connection-apim",
"properties": {
"correlationId": "069e1664-58d4-44a7-884c-775125e78258",
"debugSetting": null,
"dependencies": [],
"diagnostics": null,
"duration": "PT7.0671926S",
"error": null,
"extensions": [],
"mode": "Incremental",
"onErrorDeployment": null,
"outputResources": [
{
"apiVersion": null,
"extension": null,
"id": "/subscriptions/11be4bd6-d890-421b-85aa-9d4c9c612545/resourceGroups/rg-prod-use-ai/providers/Microsoft.CognitiveServices/accounts/foundry-prod-use-ai/projects/proj-default/connections/connection-bicep2",
"identifiers": null,
"resourceGroup": "rg-prod-use-ai",
"resourceType": "Microsoft.CognitiveServices/accounts/projects/connections"
}
],
"outputs": {
"authType": {
"type": "String",
"value": "ProjectManagedIdentity"
},
"connectionName": {
"type": "String",
"value": "connection-bicep2"
},
"hasCustomHeaders": {
"type": "Bool",
"value": false
},
"hasModelDiscovery": {
"type": "Bool",
"value": false
},
"hasStaticModels": {
"type": "Bool",
"value": true
},
"metadata": {
"type": "Object",
"value": {
"deploymentInPath": "false",
"models": "[{"name":"gpt-5.2","properties":{"model":{"name":"gpt-5.2","version":"2025-12-11","format":"OpenAI"}}}]"
}
}
},
"parameters": {
"apiName": {
"type": "String",
"value": "loadbalancefoundry"
},
"apimResourceId": {
"type": "String",
"value": "/subscriptions/11be4bd6-d890-421b-85aa-9d4c9c612545/resourceGroups/rg-prod-use-ai/providers/Microsoft.ApiManagement/service/apim-cockpit-ava-dev01"
},
"apimSubscriptionName": {
"type": "String",
"value": "master"
},
"authConfig": {
"type": "Object",
"value": {}
},
"authType": {
"type": "String",
"value": "ProjectManagedIdentity"
},
"connectionName": {
"type": "String",
"value": "connection-bicep2"
},
"customHeaders": {
"type": "Object",
"value": {}
},
"deploymentAPIVersion": {
"type": "String",
"value": ""
},
"deploymentInPath": {
"type": "String",
"value": "false"
},
"deploymentProvider": {
"type": "String",
"value": ""
},
"getModelEndpoint": {
"type": "String",
"value": ""
},
"inferenceAPIVersion": {
"type": "String",
"value": ""
},
"isSharedToAll": {
"type": "Bool",
"value": false
},
"listModelsEndpoint": {
"type": "String",
"value": ""
},
"projectResourceId": {
"type": "String",
"value": "/subscriptions/11be4bd6-d890-421b-85aa-9d4c9c612545/resourceGroups/rg-prod-use-ai/providers/Microsoft.CognitiveServices/accounts/foundry-prod-use-ai/projects/proj-default"
},
"staticModels": {
"type": "Array",
"value": [
{
"name": "gpt-5.2",
"properties": {
"model": {
"format": "OpenAI",
"name": "gpt-5.2",
"version": "2025-12-11"
}
}
}
]
}
},
"parametersLink": null,
"providers": [
{
"id": null,
"namespace": "Microsoft.Resources",
"providerAuthorizationConsentState": null,
"registrationPolicy": null,
"registrationState": null,
"resourceTypes": [
{
"aliases": null,
"apiProfiles": null,
"apiVersions": null,
"capabilities": null,
"defaultApiVersion": null,
"locationMappings": null,
"locations": [
null
],
"properties": null,
"resourceType": "deployments",
"zoneMappings": null
}
]
}
],
"provisioningState": "Succeeded",
"templateHash": "12847655066454575982",
"templateLink": null,
"timestamp": "2026-05-25T08:44:25.645661+00:00",
"validatedResources": null,
"validationLevel": null
},
"resourceGroup": "rg-prod-use-ai",
"tags": null,
"type": "Microsoft.Resources/deployments"
}`