From 9962363f4c7698d29307b1fe05db8ddb67e2652e Mon Sep 17 00:00:00 2001 From: Amir Omidi Date: Mon, 8 Jun 2020 13:55:52 -0700 Subject: [PATCH] Fixes the azure auth for postgresql (#10662) (#10753) --- .../services/connection/browser/connectionManagementService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sql/workbench/services/connection/browser/connectionManagementService.ts b/src/sql/workbench/services/connection/browser/connectionManagementService.ts index dc3b879335..dc924f0573 100644 --- a/src/sql/workbench/services/connection/browser/connectionManagementService.ts +++ b/src/sql/workbench/services/connection/browser/connectionManagementService.ts @@ -813,7 +813,7 @@ export class ConnectionManagementService extends Disposable implements IConnecti const accounts = await this._accountManagementService.getAccounts(); const azureAccounts = accounts.filter(a => a.key.providerId.startsWith('azure')); if (azureAccounts && azureAccounts.length > 0) { - let accountName = (connection.authenticationType === Constants.azureMFA) ? connection.azureAccount : connection.userName; + let accountName = (connection.authenticationType === Constants.azureMFA || connection.authenticationType === Constants.azureMFAAndUser) ? connection.azureAccount : connection.userName; let account = find(azureAccounts, account => account.key.accountId === accountName); if (account) { this._logService.debug(`Getting security token for Azure account ${account.key.accountId}`);