Update extensions/microsoft-foundry/index.ts

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
MetaX e|acc 2026-03-19 18:55:17 +08:00 committed by GitHub
parent 41cc7c8bf1
commit 7696a86e10
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;