Thanks for your detailed question! Since you're already seeing RiskyServicePrincipals data in Microsoft Graph API, but not in Event Hub, it suggests that the logs are being generated in Entra ID but may not be flowing correctly to your Event Hub due to how Diagnostic Settings handle these specific log types.
First, to answer your question about API vs. Event Hub logs, while most Entra ID logs should be available in both places, there can be a delay or difference in how certain log types are streamed. RiskyUsers and UserRiskEvents logs are typically more actively pushed via Diagnostic Settings, while RiskyServicePrincipals and ServicePrincipalRiskEvents might have different processing behaviors. Microsoft Entra ID continuously refines how workload identity risks are handled, and these logs may have additional requirements before they appear in Event Hub.
Regarding the servicePrincipalRiskDetections vs. ServicePrincipalRiskEvents, they are related but not the same. servicePrincipalRiskDetections contains detailed risk detections for service principals, while ServicePrincipalRiskEvents is meant to log risk-related events in Entra ID. The former provides risk assessment details, while the latter records specific events tied to those risks.
To ensure these logs are flowing to Event Hub, you may want to double-check your Diagnostic Settings in Entra ID:
- Go to Microsoft Entra ID → Monitoring → Diagnostic Settings
- Ensure that "Risky Service Principals" and "Service Principal Risk Events" are explicitly selected
- Confirm that the destination Event Hub is correctly configured and actively receiving other logs
If everything is configured correctly and you're still not seeing the logs, try checking Azure Monitor Logs (Log Analytics Workspace) to see if the data appears there first. If it does, but still isn’t in Event Hub, it may indicate a delay or limitation in streaming those specific logs.
Hope this helps. Do let us know if you any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.