From 1b1e092d3c108481b1134a06a6f6d8f8f7dc8ab9 Mon Sep 17 00:00:00 2001 From: James Barnett Date: Wed, 2 Sep 2026 16:38:11 -0400 Subject: [PATCH] fix: Add additional handling for Authentication_RequestFromNonPremiumTenantOrB2CTenant error to isGraphAuthorizationDenied --- cmd/list-users.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/list-users.go b/cmd/list-users.go index 63002b0..1592d09 100644 --- a/cmd/list-users.go +++ b/cmd/list-users.go @@ -152,5 +152,10 @@ func isGraphAuthorizationDenied(err error) bool { return true } + // The tenant does not have the necessary P2 license that grants access to auditlog.read.all. + if strings.Contains(msg, "Authentication_RequestFromNonPremiumTenantOrB2CTenant") && strings.Contains(msgLower, "doesn't have premium license") { + return true + } + return false }