From 7696a86e10eb2448870514488accccf012974fa3 Mon Sep 17 00:00:00 2001 From: MetaX e|acc Date: Thu, 19 Mar 2026 18:55:17 +0800 Subject: [PATCH] Update extensions/microsoft-foundry/index.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- extensions/microsoft-foundry/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/microsoft-foundry/index.ts b/extensions/microsoft-foundry/index.ts index 27e98eea23e..2e15e6414bb 100644 --- a/extensions/microsoft-foundry/index.ts +++ b/extensions/microsoft-foundry/index.ts @@ -724,7 +724,7 @@ async function loginWithTenantFallback(ctx: ProviderAuthContext): Promise<{ const message = error instanceof Error ? error.message : String(error); const isAzureTenantError = /AADSTS/i.test(message) || - /no subscriptions found/i.test(message) || + return /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(trimmed) ? undefined : "Enter a valid tenant ID"; /tenant/i.test(message); if (!isAzureTenantError) { throw error;