Blocked app watchlist in Sentinel ('BlockedOAuthApps') maintained
Create a Sentinel watchlist named 'BlockedOAuthApps' with AppId as the SearchKey. Add any revoked malicious app. Reference in KQL rules to alert on re-consent attempts.
# Alert if a previously-blocked app is consented again
let Blocked = _GetWatchlist('BlockedOAuthApps') | project AppId = SearchKey;
AuditLogs
| where OperationName == "Consent to application"
| extend AppId = tostring(TargetResources[0].id)
| where AppId in (Blocked)
| project TimeGenerated, AppId,
AppName = tostring(TargetResources[0].displayName),
GrantedBy = tostring(InitiatedBy.user.userPrincipalName)