- Remove unused variables in ApplicationInfo, ArchitectureDebugPage - Fix type errors in Dashboard, GovernanceAnalysis, GovernanceModelHelper (PageHeader description prop) - Add null checks and explicit types in DataValidationDashboard - Fix ObjectDetailModal type errors for _jiraCreatedAt and Date constructor - Remove unused imports and variables in SchemaConfigurationSettings - Update PageHeader to accept string | ReactNode for description prop
4.4 KiB
Fix: MSI Authentication Error in Azure Pipeline
🔴 Error Message
Could not fetch access token for Managed Service Principal.
Please configure Managed Service Identity (MSI) for virtual machine
🎯 Quick Fix
De service connection gebruikt Managed Service Identity (MSI), wat niet werkt met Azure DevOps Services (cloud).
Oplossing: Herconfigureer de service connection met Service Principal authenticatie.
✅ Stap-voor-Stap Oplossing
Stap 1: Verwijder Bestaande Service Connection
- Ga naar Azure DevOps
- Project Settings (onderaan links) → Service connections
- Zoek:
zuyderland-cmdb-acr-connection - Klik op ... (three dots menu) → Delete
- Bevestig verwijdering
Stap 2: Maak Nieuwe Service Connection
- Project Settings → Service connections → New service connection
- Kies "Docker Registry"
- Kies "Azure Container Registry"
- ⚠️ BELANGRIJK: Zorg dat "Service Principal" is geselecteerd als Authentication type
- NIET "Managed Identity" of "Workload Identity federation"
- WEL "Service Principal" (standaard optie)
- Vul in:
- Azure subscription: Selecteer je subscription
- Azure container registry: Selecteer
zdlasacruit de dropdown - Service connection name:
zuyderland-cmdb-acr-connection - Description: Optioneel
- Klik "Save" (of "Verify and save")
Stap 3: Test Pipeline
- Ga naar Pipelines → Je pipeline
- Klik "Run pipeline"
- De pipeline zou nu moeten werken!
🔧 Alternatief: Gebruik "Others" Optie
Als de Azure Container Registry optie nog steeds problemen geeft:
Stap 1: Verwijder Bestaande Service Connection
(Zelfde als hierboven)
Stap 2: Maak Service Connection met "Others"
- Project Settings → Service connections → New service connection
- Kies "Docker Registry"
- Kies "Others" (in plaats van "Azure Container Registry")
- Vul handmatig in:
- Docker Registry:
zdlasacr.azurecr.io - Docker ID: (ACR admin username)
- Docker Password: (ACR admin password)
- Service connection name:
zuyderland-cmdb-acr-connection
- Docker Registry:
Stap 3: Haal ACR Admin Credentials Op
# Login bij Azure
az login
# Haal admin credentials op
az acr credential show --name zdlasacr
Output:
{
"username": "zdlasacr",
"passwords": [
{
"name": "password",
"value": "xxxxxxxxxxxxx" ← Gebruik deze
}
]
}
Gebruik:
- Docker ID:
zdlasacr(of de username uit output) - Docker Password:
passwords[0].valueuit output
Stap 4: Save en Test
- Klik "Save"
- Test de pipeline opnieuw
🔍 Waarom Gebeurt Dit?
Managed Service Identity (MSI) werkt alleen met:
- ✅ Azure DevOps Server (on-premises) met Managed Identity
- ❌ NIET met Azure DevOps Services (cloud) - Dit is jouw situatie!
Service Principal werkt met:
- ✅ Azure DevOps Services (cloud) - Dit is wat je nodig hebt!
- ✅ Azure DevOps Server (on-premises)
- ✅ Alle Azure services
✅ Verificatie
Na het herconfigureren, controleer:
-
Service Connection Details:
- Ga naar Service connections →
zuyderland-cmdb-acr-connection - Check dat Authentication type = "Service Principal" (niet MSI)
- Ga naar Service connections →
-
Test Pipeline:
- Run de pipeline opnieuw
- De Docker build stap zou nu moeten werken
📚 Gerelateerde Documentatie
AZURE-SERVICE-CONNECTION-TROUBLESHOOTING.md- Algemene troubleshootingAZURE-SERVICE-CONNECTION-AUTH.md- Authentication types uitlegAZURE-DEVOPS-SETUP.md- Service connection setup guide
🆘 Nog Steeds Problemen?
Als het nog steeds niet werkt:
-
Check ACR bestaat:
az acr show --name zdlasacr -
Check ACR admin is enabled:
az acr show --name zdlasacr --query adminEnabledMoet
truezijn. Alsfalse, enable het:az acr update --name zdlasacr --admin-enabled true -
Check subscription toegang:
- Ga naar Azure Portal → Subscription → Access control (IAM)
- Check of je account toegang heeft
-
Gebruik "Others" optie als laatste redmiddel (werkt altijd)
💡 Tip: Service Principal is de aanbevolen methode voor Azure DevOps Services. Het is veilig, betrouwbaar en wordt automatisch beheerd door Azure DevOps.