- 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
8.6 KiB
Azure DevOps Service Connection - Troubleshooting
🔴 Probleem: "Could not fetch access token for Managed Service Principal" (MSI Error)
Error Message:
Could not fetch access token for Managed Service Principal.
Please configure Managed Service Identity (MSI) for virtual machine
Oorzaak: De service connection is geconfigureerd om Managed Service Identity (MSI) te gebruiken, maar dit werkt niet met Azure DevOps Services (cloud). MSI werkt alleen met Azure DevOps Server (on-premises) met Managed Identity geconfigureerd.
✅ Oplossing: Herconfigureer Service Connection met Service Principal
Stap 1: Verwijder Bestaande Service Connection
- Ga naar Azure DevOps → Project Settings → Service connections
- Zoek de service connection:
zuyderland-cmdb-acr-connection - Klik op ... (three dots) → Delete
- Bevestig verwijdering
Stap 2: Maak Nieuwe Service Connection met Service Principal
- Project Settings → Service connections → New service connection
- Kies "Docker Registry"
- Kies "Azure Container Registry"
- Belangrijk: Selecteer "Service Principal" als Authentication type (NIET Managed Identity!)
- Vul in:
- Azure subscription: Selecteer je subscription
- Azure container registry: Selecteer je ACR (
zdlasacr) - Service connection name:
zuyderland-cmdb-acr-connection
- Klik "Save" (of "Verify and save")
✅ Dit zou nu moeten werken!
Alternatief: Gebruik "Others" Optie met Admin Credentials
Als de Azure Container Registry optie nog steeds problemen geeft:
-
Kies "Docker Registry" → "Others"
-
Vul handmatig in:
- Docker Registry:
zdlasacr.azurecr.io - Docker ID: (ACR admin username)
- Docker Password: (ACR admin password)
- Docker Registry:
-
Haal ACR admin credentials op:
az acr credential show --name zdlasacrGebruik
usernameenpasswords[0].valueuit de output. -
Service connection name:
zuyderland-cmdb-acr-connection -
Save
🔴 Probleem: "Loading Registries..." blijft hangen
Als de Azure Container Registry dropdown blijft laden zonder resultaten, probeer deze oplossingen:
✅ Oplossing 1: Check Subscription Toegang
Probleem: Je hebt mogelijk geen toegang tot de subscription waar de ACR staat.
Oplossing:
-
Check in Azure Portal:
- Ga naar je Container Registry (
zdlas) - Klik op "Access control (IAM)"
- Check of je de juiste rol hebt (bijv. Owner, Contributor, of AcrPush)
- Ga naar je Container Registry (
-
Check Subscription:
- Ga naar je Azure Subscription
- Klik op "Access control (IAM)"
- Check of je toegang hebt tot de subscription
-
Probeer opnieuw:
- Ga terug naar Azure DevOps
- Selecteer de juiste subscription
- Wacht even (kan 10-30 seconden duren)
✅ Oplossing 2: Refresh/Herlaad de Pagina
Soms helpt een simpele refresh:
- Refresh de browser pagina (F5 of Cmd+R)
- Of sluit en open opnieuw de service connection wizard
- Probeer opnieuw de registry te selecteren
✅ Oplossing 3: Check Resource Group Locatie
Probleem: Soms laadt Azure DevOps alleen registries in bepaalde regio's.
Oplossing:
-
Check waar je ACR staat:
az acr show --name zdlas --query location -o tsv -
Check of de subscription toegang heeft tot die regio
-
Probeer handmatig de registry naam in te vullen (zie Oplossing 4)
✅ Oplossing 4: Handmatig Registry Naam Invoeren
Als de dropdown niet werkt, kun je handmatig de registry naam invoeren:
-
In de service connection wizard:
- Laat de dropdown leeg (of selecteer "Enter value manually")
- Typ handmatig:
zdlas - Of de volledige naam:
zdlas.azurecr.io
-
Save en test
Let op: Soms accepteert Azure DevOps alleen de registry naam zonder .azurecr.io
✅ Oplossing 5: Check Service Principal Permissions
Probleem: De Service Principal die Azure DevOps probeert aan te maken heeft mogelijk niet de juiste permissions.
Oplossing:
-
Maak handmatig een Service Principal aan:
# Login bij Azure az login # Maak Service Principal aan az ad sp create-for-rbac --name "zuyderland-cmdb-acr-sp" \ --role acrpush \ --scopes /subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.ContainerRegistry/registries/zdlas -
Gebruik deze credentials in Azure DevOps:
- Kies "Docker Registry" → "Others"
- Vul in:
- Registry URL:
zdlas.azurecr.io - Username: (van de Service Principal output)
- Password: (van de Service Principal output)
- Registry URL:
✅ Oplossing 6: Gebruik "Others" in plaats van "Azure Container Registry"
Als de Azure Container Registry optie niet werkt, gebruik dan "Others":
-
In de service connection wizard:
- Kies "Docker Registry"
- Kies "Others" (in plaats van "Azure Container Registry")
-
Vul handmatig in:
- Docker Registry:
zdlas.azurecr.io - Docker ID: (leeg laten of je ACR admin username)
- Docker Password: (je ACR admin password)
- Docker Registry:
-
Haal ACR credentials op:
# Login bij Azure az login # Haal admin credentials op az acr credential show --name zdlasGebruik de
usernameenpasswords[0].valueuit de output. -
Save en test
⚠️ Let op: Met "Others" moet je handmatig credentials beheren. Service Principal is veiliger, maar dit werkt als tijdelijke oplossing.
✅ Oplossing 7: Check Browser/Network
Probleem: Browser of network issues kunnen de dropdown blokkeren.
Oplossingen:
- Probeer een andere browser (Chrome, Firefox, Edge)
- Disable browser extensions (ad blockers, etc.)
- Check network connectivity naar Azure
- Probeer incognito/private mode
✅ Oplossing 8: Wacht Even en Probeer Later
Soms is het een tijdelijk Azure issue:
- Wacht 5-10 minuten
- Probeer opnieuw
- Check Azure Status: https://status.azure.com/
🔍 Diagnose Stappen
Om te diagnosticeren wat het probleem is:
1. Check ACR Bestaat en is Toegankelijk
# Login bij Azure
az login
# Check of ACR bestaat
az acr show --name zdlas
# Check ACR credentials
az acr credential show --name zdlas
# Check ACR permissions
az acr show --name zdlas --query "networkRuleSet" -o table
2. Check Azure DevOps Subscription Toegang
- Ga naar Azure Portal
- Ga naar je Subscription
- Check "Access control (IAM)"
- Check of je account toegang heeft
3. Check Service Principal Permissions
# List Service Principals
az ad sp list --display-name "zuyderland-cmdb-acr-sp" -o table
# Check permissions op ACR
az role assignment list --scope /subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.ContainerRegistry/registries/zdlas
💡 Aanbevolen Aanpak
Probeer in deze volgorde:
- ✅ Refresh de pagina (Oplossing 2)
- ✅ Check subscription toegang (Oplossing 1)
- ✅ Handmatig registry naam invoeren (Oplossing 4)
- ✅ Gebruik "Others" optie (Oplossing 6) - als tijdelijke oplossing
- ✅ Maak handmatig Service Principal (Oplossing 5) - voor permanente oplossing
🎯 Quick Fix (Aanbevolen)
Als de dropdown niet werkt, gebruik deze workaround:
- Kies "Docker Registry" → "Others"
- Vul in:
- Registry URL:
zdlas.azurecr.io - Username: (haal op met
az acr credential show --name zdlas) - Password: (haal op met
az acr credential show --name zdlas)
- Registry URL:
- Service connection name:
zuyderland-cmdb-acr-connection - Save
Dit werkt altijd, ook als de Azure Container Registry optie niet werkt.
Later kun je:
- De service connection verwijderen
- Opnieuw aanmaken met "Azure Container Registry" optie (als die dan wel werkt)
- Of de "Others" optie behouden (werkt ook prima)
📚 Meer Informatie
🆘 Nog Steeds Problemen?
Als niets werkt:
- Check Azure DevOps logs (als je toegang hebt)
- Contact Azure Support (als je een support plan hebt)
- Gebruik "Others" optie als workaround (werkt altijd)
De "Others" optie is een volledig werkende oplossing, alleen iets minder geautomatiseerd dan de Azure Container Registry optie.