Skip to content

Instantly share code, notes, and snippets.

@soulemike
Created July 31, 2024 15:33
Show Gist options
  • Save soulemike/d9eb938e74cfc0333321aa9844e70a00 to your computer and use it in GitHub Desktop.
Save soulemike/d9eb938e74cfc0333321aa9844e70a00 to your computer and use it in GitHub Desktop.
GraphActivity
| take 1000
| extend properties.timeGenerated, properties.appId, properties.roles, properties.scopes
| extend properties.requestUri, properties.requestMethod, properties.responseStatusCode
//
// Use to filter by App ID
//| where tostring(properties_appId) == "<AppId>"
//
// Use to summarize by app reg permissions used
//| where isnotempty(properties_roles)
//| summarize requests = count() by tostring(properties_appId), tostring(properties_roles)
//
// Use to summarize by scopes used
//| where isnotempty(properties_scopes)
//| summarize requests = count() by tostring(properties_appId), tostring(properties_scopes)
//
// Use to summarize by requested URI
//| summarize requests = count() by tostring(properties_appId), tostring(properties_requestUri)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment