Administrators Authenticating to Another Microsoft Entra ID Tenant
Description
'Detects when a privileged user account successfully authenticates from to another Microsoft Entra ID Tenant. Authentication attempts should be investigated to ensure the activity was legitimate and if there is other similar activity. Ref: https://docs.microsoft.com/azure/active-directory/fundamentals/security-operations-user-accounts#monitoring-for-successful-unusual-sign-ins'
Query · kql
let admin_users = (IdentityInfo | summarize arg_max(TimeGenerated, *) by AccountUPN | where AssignedRoles contains "admin" | summarize by tolower(AccountUPN)); SigninLogs | where TimeGenerated between(ago(14d)..ago(1d)) | where ResultType == 0 | where tolower(UserPrincipalName) in (admin_users) | where HomeTenantId != ResourceTenantId | summarize by UserPrincipalName, ResourceTenantId | join kind=rightanti (SigninLogs | where TimeGenerated > ago(1d) | where ResultType == 0 | where tolower(UserPrincipalName) in (admin_users) | where HomeTenantId != ResourceTenantId | where isnotempty(HomeTenantId) and isnotempty(ResourceTenantId)) on UserPrincipalName, ResourceTenantId | where RiskLevelAggregated != "none"