Azure Log analytics to identify user upn in Storage blob activities

Shola Lawani 531 Reputation points Microsoft Employee
2020-12-17T16:48:41.023+00:00

Hello experts,

I have enabled the storage Diagnostics setting (preview) for a storage account read, update and write activities mapped it to a log analytics workspace.

Now, if I issue the Log analytics Kusto query below, the result is not retrieving the "requesterUPN". The use case for the query is identify the user(s) that perform blob level activities in a storage account.

// Show anonymous requests

// List all requests with anonymous access over the last 3 days.
// To create an alert for this query, click '+ New alert rule'
StorageBlobLogs
| where TimeGenerated > ago(3d) and AuthenticationType == "OAuth"
| project TimeGenerated, OperationName, AuthenticationType,RequesterObjectId,RequesterUpn

What could be the issue here

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,825 questions
Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,721 questions
{count} vote

2 answers

Sort by: Most helpful
  1. bharathn-msft 5,086 Reputation points Microsoft Employee
    2021-03-08T15:33:52.92+00:00

    <<Re-sharing the information here from comments for broader community usage>>

    anonymous user In general the UPN is missing when the caller is not a user principal, but a service principal (could be a service to service call from another resource provider, a manually created service principal, or a Managed Identity).

    Please review the reference document on claims in access tokens here : Microsoft identity platform access tokens - Microsoft identity platform | Microsoft Learn

    Hope the information helps, please let us know if you have any further queries. Thanks

    0 comments No comments

  2. Pini Krisher 1 Reputation point
    2022-08-02T09:54:06.807+00:00

    Hi
    Why the RequesterUpn field in my logs is always empty? @bharathn-msft

    0 comments No comments