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`); }