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: Most helpful
  1. Julien Ly 0 Reputation points
    2026-12-01T07:46:16.82+00:00

    I tested the secrets part in my lab tenant on Nov 29: one app registration with two client secrets, a confidential client doing the authorization code flow, then a token refresh with secret A and another one with secret B.

    Q1. Same result as yours. The three token calls showed up as non-interactive user sign-ins with clientCredentialType = clientSecret, but servicePrincipalCredentialKeyId was null, servicePrincipalCredentialThumbprint empty and federatedCredentialId null, and nothing in authenticationProcessingDetails pointed to the key. The entries for secret A and secret B looked the same. The delegated flow didn't create any service principal sign-in for the app.

    Q2. I tried the two usage reports in Graph beta.

    • GET /beta/reports/appCredentialSignInActivities is documented per credential, with sign-in activity "across all flows". Neither secret showed up in my tenant, even after the report had caught up with that day: another app's certificate row moved to Nov 29, 23:37 UTC, ten hours after my test calls. I checked again on Dec 1.
    • GET /beta/reports/servicePrincipalSignInActivities did update. For the app, lastSignInRequestId was the request ID of the last token call, the refresh with secret B. But the activity was filed under applicationAuthenticationClientSignInActivity, and delegatedClientSignInActivity stayed empty. The report docs warn that during the preview some activity can be classified as app-only by mistake. The request ID only takes you back to the sign-in entry, which has no key ID.

    So in my test, nothing told me which secret was used in the delegated flow.

    On Q4, your own finding with the federated credential is the one case where the sign-in log names the credential (FederatedCredentialId), which is an argument for moving away from secrets where you can. I didn't test Key Vault logging, so I'll leave Q3 to someone who has.

    Graph reference: appCredentialSignInActivity

    Usage and insights report, service principal sign-in activity (preview)

    Tested in my own lab tenant, write-up with help from Claude.

    Was this answer helpful?

    0 comments No comments

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.