Skip to content

Commit 7a4d034

Browse files
Disable macOS broker support due to blocking MSAL bug (microsoft#264954)
Sigh... Unfortunately, MSAL seems to fail for clients that don't have managed machines that have opted in to the broker... I have opened a blocking issue on them internally. At least, when they fix it, it would just be a matter of updating the package version and the conditional here.
1 parent 5ffb74e commit 7a4d034

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

extensions/microsoft-authentication/src/node/cachedPublicClientApplication.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,17 @@ export class CachedPublicClientApplication implements ICachedPublicClientApplica
5151

5252
const loggerOptions = new MsalLoggerOptions(_logger, telemetryReporter);
5353
let broker: BrokerOptions | undefined;
54-
if (workspace.getConfiguration('microsoft-authentication').get<'msal' | 'msal-no-broker'>('implementation') !== 'msal-no-broker') {
54+
if (process.platform !== 'win32') {
55+
this._logger.info(`[${this._clientId}] Native Broker is only available on Windows`);
56+
} else if (workspace.getConfiguration('microsoft-authentication').get<'msal' | 'msal-no-broker'>('implementation') === 'msal-no-broker') {
57+
this._logger.info(`[${this._clientId}] Native Broker disabled via settings`);
58+
} else {
5559
const nativeBrokerPlugin = new NativeBrokerPlugin();
5660
this.isBrokerAvailable = nativeBrokerPlugin.isBrokerAvailable;
5761
this._logger.info(`[${this._clientId}] Native Broker enabled: ${this.isBrokerAvailable}`);
5862
if (this.isBrokerAvailable) {
5963
broker = { nativeBrokerPlugin };
6064
}
61-
} else {
62-
this._logger.info(`[${this._clientId}] Native Broker disabled via settings`);
6365
}
6466
this._pca = new PublicClientApplication({
6567
auth: { clientId: _clientId },

0 commit comments

Comments
 (0)