Skip to content

Commit fa24324

Browse files
add PMI update in doc (#465)
* few more changes * few more changes --------- Co-authored-by: vtomar <vtomar@microsoft.com>
1 parent 4b254be commit fa24324

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

infrastructure/infrastructure-setup-bicep/01-connections/apim-and-modelgateway-integration-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ Specialized connections designed for Azure API Management integration scenarios.
207207

208208
**🔐 Authentication Support:**
209209
- **🔑 API Key**: Subscription key authentication
210-
- **🆔 Microsoft Entra ID**: Azure Active Directory integration (coming soon)
210+
- **🆔 Microsoft Entra ID**: Project Managed Identity
211211

212212
📋 **Detailed Configuration**: [APIM Connection Objects](./apim/APIM-Connection-Objects.md)
213213

infrastructure/infrastructure-setup-bicep/01-connections/apim/apim-setup-guide-for-agents.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,16 +387,22 @@ First, install the required Python package:
387387
pip install requests
388388
```
389389

390-
Then run the validation script:
390+
Then run the validation script (use ONE of the authentication methods):
391391
```bash
392-
# For APIM connection testing:
392+
# For ApiKey authentication (uses APIM subscription key):
393393
python3 test_apim_connection.py --params samples/YOUR_CHOSEN_FILE.json --api-key YOUR_APIM_SUBSCRIPTION_KEY --deployment-name YOUR_DEPLOYMENT --target-url YOUR_APIM_BASE_URL
394+
395+
# For ProjectManagedIdentity authentication (uses Authorization header):
396+
python3 test_apim_connection.py --params samples/YOUR_CHOSEN_FILE.json --authorization "Bearer YOUR_TOKEN" --deployment-name YOUR_DEPLOYMENT --target-url YOUR_APIM_BASE_URL
394397
```
395398

396399
**Example:**
397400
```bash
398-
# Complete example with actual values
401+
# ApiKey auth example
399402
python3 test_apim_connection.py --params samples/parameters-static-models.json --api-key abc123def456 --deployment-name gpt-4o --target-url https://my-apim.azure-api.net/foundry/models
403+
404+
# ProjectManagedIdentity auth example (with Bearer token)
405+
python3 test_apim_connection.py --params samples/parameters-static-models.json --authorization "Bearer eyJ0eXAi..." --deployment-name gpt-4o --target-url https://my-apim.azure-api.net/foundry/models
400406
```
401407

402408
This validation script tests:

infrastructure/infrastructure-setup-bicep/01-connections/apim/connection-apim.bicep

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ var validationMessage = bothConfiguredError ? 'ERROR: Cannot configure both stat
110110
var neitherConfiguredError = !hasModelDiscovery && !hasStaticModels
111111
var neitherConfiguredMessage = 'ERROR: Must configure either static models (staticModels array) OR dynamic discovery (listModelsEndpoint, getModelEndpoint, deploymentProvider). Cannot have neither.'
112112

113+
113114
// Force deployment failure if both are configured
114115
resource deploymentValidation 'Microsoft.Resources/deploymentScripts@2023-08-01' = if (bothConfiguredError) {
115116
name: 'validation-error-${uniqueString(resourceGroup().id)}'
@@ -134,6 +135,7 @@ resource configValidation 'Microsoft.Resources/deploymentScripts@2023-08-01' = i
134135
}
135136
}
136137

138+
137139
// Build metadata using conditional union - includes only non-empty parameters
138140
var metadata = union(
139141
// Always include basic configuration

0 commit comments

Comments
 (0)