Snippets

Snippet KQL : diagnostiquer un échec Workload Identity Federation en CI

Une requête courte pour retrouver les échecs de connexion d'un principal fédéré avant de revenir à un secret client.

21 juin 2026 azureentra-idworkload-identityoidcciidentitykqllogsrunbook

Quand une pipeline CI échoue après migration vers OIDC, vérifie les sign-ins du principal applicatif avant de recréer un secret client.

kusto workload-identity-ci-failures.kql
let Window = 24h;
let PrincipalAppId = "00000000-0000-0000-0000-000000000000";
AADServicePrincipalSignInLogs
| where TimeGenerated > ago(Window)
| where AppId == PrincipalAppId or ServicePrincipalId == PrincipalAppId
| project TimeGenerated,
        AppDisplayName,
        ServicePrincipalId,
        ResultType,
        ResultDescription,
        ConditionalAccessStatus,
        IPAddress,
        ResourceDisplayName,
        CorrelationId,
        UniqueTokenIdentifier
| order by TimeGenerated desc

Lecture rapide : absence totale de ligne renvoie vers issuer, subject ou audience OIDC ; un refus explicite renvoie vers credential fédéré ou policy Entra ; un succès côté Entra avec échec aval renvoie vers RBAC Azure, Key Vault ou ressource cible.