Fixing an expression typo for azure mfa in import extension (#17002)

* Fixing if expression for azure mfa in import

* updating import package number
This commit is contained in:
Aasim Khan
2021-09-05 21:49:37 -07:00
committed by GitHub
parent e962d63fa4
commit cc4780840c
2 changed files with 2 additions and 2 deletions

View File

@@ -2,7 +2,7 @@
"name": "import",
"displayName": "SQL Server Import",
"description": "SQL Server Import for Azure Data Studio supports importing CSV or JSON files into SQL Server.",
"version": "1.4.0",
"version": "1.4.1",
"publisher": "Microsoft",
"preview": true,
"engines": {

View File

@@ -135,7 +135,7 @@ export class SummaryPage extends ImportPage {
const connectionString = await azdata.connection.getConnectionString(currentServer.connectionId, includePasswordInConnectionString);
let accessToken = undefined;
if (currentServer.options.authenticationType = 'AzureMFA') {
if (currentServer.options.authenticationType === 'AzureMFA') {
const azureAccount = (await azdata.accounts.getAllAccounts()).filter(v => v.key.accountId === currentServer.options.azureAccount)[0];
accessToken = (await azdata.accounts.getAccountSecurityToken(azureAccount, currentServer.options.azureTenantId, azdata.AzureResource.Sql)).token;
}