diff --git a/extensions/azurecore/src/account-provider/azureAccountProvider.ts b/extensions/azurecore/src/account-provider/azureAccountProvider.ts index 25f982de45..654ea29eeb 100644 --- a/extensions/azurecore/src/account-provider/azureAccountProvider.ts +++ b/extensions/azurecore/src/account-provider/azureAccountProvider.ts @@ -107,14 +107,14 @@ export class AzureAccountProvider implements azdata.AccountProvider, vscode.Disp return this._getSecurityToken(account, resource); } - getAccountSecurityToken(account: azdata.Account, tenant: string, resource: azdata.AzureResource): Thenable { - return this._getAccountSecurityToken(account, tenant, resource); + getAccountSecurityToken(account: azdata.Account, tenantId: string, resource: azdata.AzureResource): Thenable { + return this._getAccountSecurityToken(account, tenantId, resource); } - private async _getAccountSecurityToken(account: azdata.Account, tenant: string, resource: azdata.AzureResource): Promise { + private async _getAccountSecurityToken(account: azdata.Account, tenantId: string, resource: azdata.AzureResource): Promise { await this.initCompletePromise; const azureAuth = this.getAuthMethod(undefined); - return azureAuth?.getAccountSecurityToken(account, tenant, resource); + return azureAuth?.getAccountSecurityToken(account, tenantId, resource); } private async _getSecurityToken(account: azdata.Account, resource: azdata.AzureResource): Promise { diff --git a/src/sql/azdata.d.ts b/src/sql/azdata.d.ts index 1f6a9d0505..fd63e6e261 100644 --- a/src/sql/azdata.d.ts +++ b/src/sql/azdata.d.ts @@ -2133,7 +2133,8 @@ declare module 'azdata' { /** * Generates a security token by asking the account's provider - * @param account Account to generate security token for (defaults to + * @param account Account to generate security token for + * @param resource Type of resource to get the security token for (defaults to * AzureResource.ResourceManagement if not given) * @return Promise to return the security token * @deprecated use getAccountSecurityToken @@ -2142,11 +2143,12 @@ declare module 'azdata' { /** * Generates a security token by asking the account's provider - * @param account - * @param tenant - * @param resource + * @param account The account to retrieve the security token for + * @param tenantId The ID of the tenant associated with this account + * @param resource Type of resource to get the security token for (defaults to + * AzureResource.ResourceManagement if not given) */ - export function getAccountSecurityToken(account: Account, tenant: string, resource: AzureResource): Thenable<{ token: string, tokenType?: string } | undefined>; + export function getAccountSecurityToken(account: Account, tenantId: string, resource: AzureResource): Thenable<{ token: string, tokenType?: string } | undefined>; /** * An [event](#Event) which fires when the accounts have changed.