Query Details
# List the external admin activities
### Defender For Endpoint
```
CloudAppEvents
| where IsExternalUser == 1 and AccountType == "Admin"
| summarize
TotalActivities = count(),
ActionsPerformed = make_set(ActionType),
Applications = make_set(Application),
IPsUsed = make_set(IPAddress)
by AccountId
| sort by TotalActivities
```
### Sentinel
```
CloudAppEvents
| where IsExternalUser == 1 and AccountType == "Admin"
| summarize
TotalActivities = count(),
ActionsPerformed = make_set(ActionType),
Applications = make_set(Application),
IPsUsed = make_set(IPAddress)
by AccountId
| sort by TotalActivities
```
This query lists the external admin activities in both Defender for Endpoint and Sentinel. It filters the CloudAppEvents data to include only external users who have an account type of "Admin". It then summarizes the data by counting the total activities for each account, creating sets of the actions performed, applications used, and IP addresses used. Finally, it sorts the results by the total number of activities.

Bert-Jan Pals
Released: February 14, 2023
Tables
Keywords
Operators