mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-14 18:46:34 -05:00
Fix connection issue with wrong resource endpoint (#19387)
* Fix connection bug accessing PBI resource * Address CR feedback * Fix null check
This commit is contained in:
@@ -81,6 +81,10 @@ export abstract class AzureAuth implements vscode.Disposable {
|
||||
this.resources = this.resources.concat(this.metadata.settings.azureKustoResource);
|
||||
}
|
||||
|
||||
if (this.metadata.settings.powerBiResource) {
|
||||
this.resources = this.resources.concat(this.metadata.settings.powerBiResource);
|
||||
}
|
||||
|
||||
this.scopes = [...this.metadata.settings.scopes];
|
||||
this.scopesString = this.scopes.join(' ');
|
||||
}
|
||||
|
||||
@@ -20,7 +20,8 @@ const enum SettingIds {
|
||||
ado = 'ado',
|
||||
ala = 'ala',
|
||||
storage = 'storage',
|
||||
kusto = 'kusto'
|
||||
kusto = 'kusto',
|
||||
powerbi = 'powerbi'
|
||||
}
|
||||
|
||||
const publicAzureSettings: ProviderSettings = {
|
||||
@@ -87,6 +88,11 @@ const publicAzureSettings: ProviderSettings = {
|
||||
endpoint: 'https://kusto.kusto.windows.net',
|
||||
azureResourceId: AzureResource.AzureKusto,
|
||||
},
|
||||
powerBiResource: {
|
||||
id: SettingIds.powerbi,
|
||||
endpoint: 'https://analysis.windows.net/powerbi/api',
|
||||
azureResourceId: AzureResource.PowerBi
|
||||
},
|
||||
redirectUri: 'https://vscode-redirect.azurewebsites.net/',
|
||||
scopes: [
|
||||
'openid', 'email', 'profile', 'offline_access',
|
||||
@@ -147,6 +153,11 @@ const usGovAzureSettings: ProviderSettings = {
|
||||
endpointSuffix: '.core.usgovcloudapi.net',
|
||||
azureResourceId: AzureResource.AzureStorage
|
||||
},
|
||||
powerBiResource: {
|
||||
id: SettingIds.powerbi,
|
||||
endpoint: 'https://analysis.windows.net/powerbi/api',
|
||||
azureResourceId: AzureResource.PowerBi
|
||||
},
|
||||
redirectUri: 'https://vscode-redirect.azurewebsites.net/',
|
||||
scopes: [
|
||||
'openid', 'email', 'profile', 'offline_access',
|
||||
@@ -251,6 +262,11 @@ const germanyAzureSettings: ProviderSettings = {
|
||||
endpointSuffix: '.core.cloudapi.de',
|
||||
azureResourceId: AzureResource.AzureStorage
|
||||
},
|
||||
powerBiResource: {
|
||||
id: SettingIds.powerbi,
|
||||
endpoint: 'https://analysis.windows.net/powerbi/api',
|
||||
azureResourceId: AzureResource.PowerBi
|
||||
},
|
||||
redirectUri: 'https://vscode-redirect.azurewebsites.net/',
|
||||
scopes: [
|
||||
'openid', 'email', 'profile', 'offline_access',
|
||||
@@ -310,6 +326,11 @@ const chinaAzureSettings: ProviderSettings = {
|
||||
endpointSuffix: '.core.chinacloudapi.cn',
|
||||
azureResourceId: AzureResource.AzureStorage
|
||||
},
|
||||
powerBiResource: {
|
||||
id: SettingIds.powerbi,
|
||||
endpoint: 'https://analysis.windows.net/powerbi/api',
|
||||
azureResourceId: AzureResource.PowerBi
|
||||
},
|
||||
redirectUri: 'https://vscode-redirect.azurewebsites.net/',
|
||||
scopes: [
|
||||
'openid', 'email', 'profile', 'offline_access',
|
||||
|
||||
7
extensions/azurecore/src/azurecore.d.ts
vendored
7
extensions/azurecore/src/azurecore.d.ts
vendored
@@ -130,10 +130,15 @@ declare module 'azurecore' {
|
||||
azureLogAnalyticsResource?: Resource;
|
||||
|
||||
/**
|
||||
* Information that describes the Azure Storage resourceI
|
||||
* Information that describes the Azure Storage resource
|
||||
*/
|
||||
azureStorageResource?: Resource;
|
||||
|
||||
/**
|
||||
* Information that describes the Power BI resource
|
||||
*/
|
||||
powerBiResource?: Resource;
|
||||
|
||||
/**
|
||||
* A list of tenant IDs to authenticate against. If defined, then these IDs will be used
|
||||
* instead of querying the tenants endpoint of the armResource
|
||||
|
||||
Reference in New Issue
Block a user