From 151a19f321746777fd8c05ec5a8d4c4ea174f892 Mon Sep 17 00:00:00 2001 From: Tyler James Leonhardt <2644648+TylerLeonhardt@users.noreply.github.com> Date: Tue, 2 Sep 2025 12:28:03 -1000 Subject: [PATCH] Only add the broker if it's available (#264785) We shouldn't have to do this, but let's see if this resolves issues with users who don't have the broker installed. --- .../src/node/cachedPublicClientApplication.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions/microsoft-authentication/src/node/cachedPublicClientApplication.ts b/extensions/microsoft-authentication/src/node/cachedPublicClientApplication.ts index e7a46ecddea..97221a2a1b8 100644 --- a/extensions/microsoft-authentication/src/node/cachedPublicClientApplication.ts +++ b/extensions/microsoft-authentication/src/node/cachedPublicClientApplication.ts @@ -55,7 +55,9 @@ export class CachedPublicClientApplication implements ICachedPublicClientApplica const nativeBrokerPlugin = new NativeBrokerPlugin(); this.isBrokerAvailable = nativeBrokerPlugin.isBrokerAvailable; this._logger.info(`[${this._clientId}] Native Broker enabled: ${this.isBrokerAvailable}`); - broker = { nativeBrokerPlugin }; + if (this.isBrokerAvailable) { + broker = { nativeBrokerPlugin }; + } } else { this._logger.info(`[${this._clientId}] Native Broker disabled via settings`); }