Tracing Client Credential Usage in Entra ID Non-Interactive Sign-in Logs: Alternative Methods and Key Vault Logging Security Review

용각 이 0 Reputation points
2026-11-17T08:18:21.9833333+00:00

User's image

Hello,

I am currently designing an auditing and monitoring architecture to track the usage of credentials (Certificates, Secrets, and Federated Credentials) configured on Microsoft Entra App Registrations.

For validation, I configured multiple credentials under a single App Registration:

  • Two X.509 Certificates (clientAssertion)
  • Two Client Secrets (clientSecret: e.g., auto-screte and test-screte)
  • One Workload Identity Federation Credential (fic-asw-federation)

I tested token issuance and refresh operations under non-interactive delegated user flows and observed the resulting logs in AADNonInteractiveUserSignInLogs and SigninLogs.

1. Observed Limitations

  • Federated Identity Credential (FIC): The FederatedCredentialId column in AADNonInteractiveUserSignInLogs captures the exact GUID, enabling a 1:1 match with audit logs (AuditLogs).
  • Client Secrets & Client Assertions: While ClientCredentialType shows clientSecret, the ServicePrincipalCredentialKeyId column is empty/null in user sign-in log schemas. When multiple active secrets exist on the application, it is impossible via KQL to determine which specific Secret ID (KeyIdentifier) was authenticated for a given sign-in event.

2. Questions to Microsoft Community & Support

Q1. Secret Key ID Availability in User Sign-in Logs

  • While AADServicePrincipalSignInLogs includes ServicePrincipalCredentialKeyId, user-context logs do not. Is there any existing column or property within AuthenticationProcessingDetails in AADNonInteractiveUserSignInLogs that records the specific keyId of the Client Secret or Certificate used?

Q2. Alternative Methods Outside of KQL

  • Outside of Log Analytics KQL queries, are there official alternative mechanisms (e.g., specific Microsoft Graph endpoints, Entra Recommendations for unused credentials, or Workload Identity Protection telemetry) to audit and trace the exact usage of application credentials?

Q3. Feasibility & Security Review of Azure Key Vault (AKV) Logging

  • To compensate for Entra ID's logging gap, we are evaluating storing the Client Secrets in Azure Key Vault and tracking access via Key Vault Diagnostic Logging (SecretGet events).
  • Because backend applications typically read the secret from AKV once at startup and cache it in memory across thousands of token requests, this will not offer 1:1 transaction-level mapping with Entra ID sign-in events.
  • From an identity and security auditing standpoint, is relying on Key Vault audit logs considered a recommended approach for tracking credential utilization, and what security caveats should we consider?

Q4. Microsoft Best Practices for Auditable Credential Architecture

  • For strict incident response (e.g., verifying if a leaked client secret was actively exploited in delegated token flows), what is the official Microsoft recommendation? (e.g., enforcing single-secret lifecycle governance, or migrating entirely to Secretless architectures such as Managed Identities and Workload Identity Federation?)

Thank you in advance for your insights.Hello,

I am currently designing an auditing and monitoring architecture to track the usage of credentials (Certificates, Secrets, and Federated Credentials) configured on Microsoft Entra App Registrations.

For validation, I configured multiple credentials under a single App Registration:

  • Two X.509 Certificates (clientAssertion)
  • Two Client Secrets (clientSecret: e.g., auto-screte and test-screte)
  • One Workload Identity Federation Credential (fic-asw-federation)

I tested token issuance and refresh operations under non-interactive delegated user flows and observed the resulting logs in AADNonInteractiveUserSignInLogs and SigninLogs.

1. Observed Limitations

  • Federated Identity Credential (FIC): The FederatedCredentialId column in AADNonInteractiveUserSignInLogs captures the exact GUID, enabling a 1:1 match with audit logs (AuditLogs).
  • Client Secrets & Client Assertions: While ClientCredentialType shows clientSecret, the ServicePrincipalCredentialKeyId column is empty/null in user sign-in log schemas. When multiple active secrets exist on the application, it is impossible via KQL to determine which specific Secret ID (KeyIdentifier) was authenticated for a given sign-in event.

2. Questions to Microsoft Community & Support

Q1. Secret Key ID Availability in User Sign-in Logs

  • While AADServicePrincipalSignInLogs includes ServicePrincipalCredentialKeyId, user-context logs do not. Is there any existing column or property within AuthenticationProcessingDetails in AADNonInteractiveUserSignInLogs that records the specific keyId of the Client Secret or Certificate used?

Q2. Alternative Methods Outside of KQL

  • Outside of Log Analytics KQL queries, are there official alternative mechanisms (e.g., specific Microsoft Graph endpoints, Entra Recommendations for unused credentials, or Workload Identity Protection telemetry) to audit and trace the exact usage of application credentials?

Q3. Feasibility & Security Review of Azure Key Vault (AKV) Logging

  • To compensate for Entra ID's logging gap, we are evaluating storing the Client Secrets in Azure Key Vault and tracking access via Key Vault Diagnostic Logging (SecretGet events).
  • Because backend applications typically read the secret from AKV once at startup and cache it in memory across thousands of token requests, this will not offer 1:1 transaction-level mapping with Entra ID sign-in events.
  • From an identity and security auditing standpoint, is relying on Key Vault audit logs considered a recommended approach for tracking credential utilization, and what security caveats should we consider?

Q4. Microsoft Best Practices for Auditable Credential Architecture

  • For strict incident response (e.g., verifying if a leaked client secret was actively exploited in delegated token flows), what is the official Microsoft recommendation? (e.g., enforcing single-secret lifecycle governance, or migrating entirely to Secretless architectures such as Managed Identities and Workload Identity Federation?)

Thank you in advance for your insights.

Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments

1 answer

Sort by: Oldest
  1. AI answer

    2026-11-17T08:19:52.77+00:00

    AADNonInteractiveUserSignInLogs does not document a per-secret or per-certificate key identifier, so exact credential attribution for delegated non-interactive user events requires either application-side telemetry or a credential architecture that makes the credential unambiguous.

    Q1: Credential ID in user-context sign-in logs

    The documented user-log schema includes ClientCredentialType, FederatedCredentialId, and AuthenticationProcessingDetails, but not ServicePrincipalCredentialKeyId or a certificate-thumbprint field. AuthenticationProcessingDetails is documented only as authentication-processor details; no documented key/value identifies the client secret or certificate used ^1^.

    By contrast, the service-principal schema explicitly provides:

    • ServicePrincipalCredentialKeyId
    • ServicePrincipalCredentialThumbprint
    • FederatedCredentialId

    ^2^

    Therefore:

    • Your FIC correlation is supported by the documented FederatedCredentialId.
    • There is no documented equivalent for distinguishing multiple secrets or certificates in a delegated nonInteractiveUser event.
    • Querying sign-ins through Microsoft Graph or Graph PowerShell changes the access method, not the underlying event’s documented fields ^3^.

    Q2: Alternative telemetry

    The closest supported per-credential inventory is:

    1. Entra admin center → Entra ID → Monitoring & health → Usage & insights → Application credential activity.
    2. Review credential type, last-used date, expiration, application/service-principal origin, and identifiers.
    3. For automation, use the Microsoft Graph beta appCredentialSignInActivity resource, which can be retrieved by id, keyId, and appId ^4^.

    This provides last credential activity, not a transaction-by-transaction join to a delegated user sign-in.

    Also use these complementary controls:

    • Unused/expiring credential recommendations: preview recommendations identify unused and expiring application credentials. Graph access to recommendations uses DirectoryRecommendations.Read.All; updates require DirectoryRecommendations.ReadWrite.All ^5^.
    • Workload Identity Protection: with at least Security Reader, inspect ID Protection → Risky workload identities. Its detections include leaked credentials, suspicious sign-ins, unusual credential type, and suspicious API traffic. Full details and risk-based controls require Workload Identities Premium ^6^.

    These are risk and lifecycle signals; they do not restore per-secret attribution to the delegated non-interactive user event.

    Q3: Key Vault audit semantics

    Key Vault auditing is recommended for determining who retrieved or operated on a secret, but it cannot prove which cached value was presented to Entra for every subsequent token request. Microsoft explicitly recommends application-side caching to reduce Key Vault calls, so the expected relationship is one SecretGet followed by potentially many token requests ^7^.

    Enable AuditEvent diagnostics:

    az monitor diagnostic-settings create \
      --name myDiagnosticSettings \
      --resource <key-vault-resource-id> \
      --logs '[{"category":"AuditEvent","enabled":true}]' \
      --workspace <log-analytics-workspace-id>
    

    This records operations such as SecretGet, including time, requesting identity, caller IP, result, and request/secret URI ^8^.

    Treat these logs as secret-retrieval evidence, not Entra credential-use evidence. Secure the design with:

    • Managed identity for vault access.
    • Azure RBAC and least privilege; avoid legacy access policies for critical workloads.
    • Separate vaults by application/environment.
    • Private endpoints or firewall restrictions.
    • Soft delete, purge protection, rotation, audit logging, and alerts ^9^.

    Validation procedure

    1. In a controlled test, use each credential independently.
    2. Wait for log/report ingestion.
    3. Confirm its keyId and last-used activity in Application credential activity.
    4. If Key Vault-backed, retrieve each secret version once and verify the corresponding SecretGet.
    5. Confirm that the delegated sign-in still exposes only credential type/FIC ID—not secret keyId.
    6. Record application instance, secret version, deployment, and token-request correlation ID in application telemetry. That is the practical source for 1:1 attribution when Entra does not emit it.

    Microsoft recommends moving away from password- or certificate-based authentication toward token-based authentication:

    1. Use managed identity for Azure-hosted workloads.
    2. Use federated identity credentials for supported external workloads.
    3. If migration is not yet possible, keep secrets in Key Vault, limit their lifetime, rotate them, scan repositories, and enforce application-management policies. Premium licensing is required for application authentication policy management ^10^.

    Where secrets remain and definitive attribution is required, use a separate app/service principal per workload or deployment boundary, or allow only one active production credential except during a tightly controlled rotation window. This makes sign-in attribution operationally unambiguous even when the user log omits keyId.

    For suspected compromise:

    1. Inventory credentials on both application and service-principal objects.
    2. Review sign-in anomalies, target resources, and audit events for Update Application – Certificates and secrets management ^11^.
    3. Add and validate a replacement identity or credential end to end.
    4. Confirm rollback access and coordinate with workload owners.
    5. Remove the suspected credential; if the identity itself is at risk, remove all existing credentials and rotate Key Vault secrets accessible to it.
    6. For urgent confirmed compromise, disable the service principal to contain access.

    Warning: disabling a service principal or revoking active credentials can immediately stop production authentication. In routine rotation, validate the replacement before revocation; in emergency containment, accept and document any outage risk deliberately.


    References

    1. AADNonInteractiveUserSignInLogs
    2. AADServicePrincipalSignInLogs
    3. Microsoft Graph PowerShell cmdlets for Microsoft Entra monitoring and health
    4. What is the Usage and insights report in Microsoft Entra ID?
    5. Microsoft Entra recommendation: Remove unused credentials from apps (preview)
    6. Securing workload identities
    7. Azure Key Vault developer's guide
    8. Azure Key Vault logging
    9. Secure your Azure Key Vault
    10. Migrate applications away from secret-based authentication
    11. Compromised and malicious applications investigation
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.