diff --git a/localization/xliff/vscode-mssql.xlf b/localization/xliff/vscode-mssql.xlf index 7944009016..d388088bea 100644 --- a/localization/xliff/vscode-mssql.xlf +++ b/localization/xliff/vscode-mssql.xlf @@ -4463,6 +4463,9 @@ Sort and filter your query results to find the data you need quickly. + + Sovereign cloud equivalent for `.crm.dynamics.com` (including leading dot) + Sovereign cloud equivalent for `.database.fabric.microsoft.com` (including leading dot) diff --git a/package.json b/package.json index e82aac4b60..4c8d045a29 100644 --- a/package.json +++ b/package.json @@ -2127,6 +2127,13 @@ "null" ], "description": "%mssql.customEnvironment.fabricDataWarehouseDnsSuffix%" + }, + "dynamicsCrmDnsSuffix": { + "type": [ + "string", + "null" + ], + "description": "%mssql.customEnvironment.dynamicsCrmDnsSuffix%" } } } diff --git a/package.nls.json b/package.nls.json index 1adb8e14a8..4422e5f2df 100644 --- a/package.nls.json +++ b/package.nls.json @@ -254,5 +254,6 @@ "mssql.customEnvironment.fabricApiUriBase": "Sovereign cloud equivalent for `https://api.fabric.microsoft.com/v1/`", "mssql.customEnvironment.fabricScopeUriBase": "Sovereign cloud equivalent for `https://analysis.windows.net/powerbi/api/`", "mssql.customEnvironment.fabricSqlDbDnsSuffix": "Sovereign cloud equivalent for `.database.fabric.microsoft.com` (including leading dot)", - "mssql.customEnvironment.fabricDataWarehouseDnsSuffix": "Sovereign cloud equivalent for `.datawarehouse.fabric.microsoft.com` (including leading dot)" + "mssql.customEnvironment.fabricDataWarehouseDnsSuffix": "Sovereign cloud equivalent for `.datawarehouse.fabric.microsoft.com` (including leading dot)", + "mssql.customEnvironment.dynamicsCrmDnsSuffix": "Sovereign cloud equivalent for `.crm.dynamics.com` (including leading dot)" } diff --git a/src/azure/providerSettings.ts b/src/azure/providerSettings.ts index 12a9d65a25..e76f923058 100644 --- a/src/azure/providerSettings.ts +++ b/src/azure/providerSettings.ts @@ -74,6 +74,9 @@ export const publicAzureProviderSettings: IProviderSettings = { sqlDbDnsSuffix: ".database.fabric.microsoft.com", dataWarehouseDnsSuffix: ".datawarehouse.fabric.microsoft.com", }, + dataverse: { + dynamicsCrmDnsSuffix: ".crm.dynamics.com", + }, scopes: [ "openid", "email", @@ -120,6 +123,9 @@ const usGovernmentCloudProviderSettings: IProviderSettings = { sqlDbDnsSuffix: undefined, dataWarehouseDnsSuffix: undefined, }, + dataverse: { + dynamicsCrmDnsSuffix: undefined, + }, scopes: [ "openid", "email", @@ -166,6 +172,9 @@ const chinaCloudProviderSettings: IProviderSettings = { sqlDbDnsSuffix: undefined, dataWarehouseDnsSuffix: undefined, }, + dataverse: { + dynamicsCrmDnsSuffix: undefined, + }, scopes: [ "openid", "email", @@ -185,6 +194,7 @@ interface MssqlEnvironmentAdditions { fabricScopeUriBase?: string; fabricSqlDbDnsSuffix?: string; fabricDataWarehouseDnsSuffix?: string; + dynamicsCrmDnsSuffix?: string; } interface MssqlEnvironment extends AzureEnvironments.Environment, MssqlEnvironmentAdditions { @@ -241,6 +251,9 @@ function getCustomCloudProviderSettings(): IProviderSettings { sqlDbDnsSuffix: customCloud.fabricSqlDbDnsSuffix, dataWarehouseDnsSuffix: customCloud.fabricDataWarehouseDnsSuffix, }, + dataverse: { + dynamicsCrmDnsSuffix: customCloud.dynamicsCrmDnsSuffix, + }, scopes: [ "openid", "email", diff --git a/src/models/connectionInfo.ts b/src/models/connectionInfo.ts index d90d9ed28e..50a12d79b4 100644 --- a/src/models/connectionInfo.ts +++ b/src/models/connectionInfo.ts @@ -295,6 +295,7 @@ export function getConnectionDisplayName(connection: IConnectionInfo): string { export enum ServerType { Azure = "Azure", Fabric = "Fabric", + Dynamics = "Dynamics", Sql = "SQL", DataWarehouse = "DataWarehouse", Local = "Local", @@ -332,6 +333,10 @@ export function getServerTypes(connection: IConnectionInfo, account?: IAccount): ServerType.Fabric, ServerType.DataWarehouse, ], + [providerSettings.dataverse.dynamicsCrmDnsSuffix]: [ + ServerType.Dynamics, + ServerType.Sql, + ], }; for (const [name, types] of Object.entries(typeMappings)) { diff --git a/src/models/contracts/azure.ts b/src/models/contracts/azure.ts index 8e95272800..c0431b6e9f 100644 --- a/src/models/contracts/azure.ts +++ b/src/models/contracts/azure.ts @@ -136,6 +136,9 @@ export interface IProviderSettings { sqlDbDnsSuffix: string; dataWarehouseDnsSuffix: string; }; + dataverse: { + dynamicsCrmDnsSuffix: string; + }; } export interface IProviderResources { diff --git a/test/unit/connectionInfo.test.ts b/test/unit/connectionInfo.test.ts index 9e2a1b1368..1e19a404ee 100644 --- a/test/unit/connectionInfo.test.ts +++ b/test/unit/connectionInfo.test.ts @@ -260,6 +260,10 @@ test("getServerTypes", () => { input: "test.ppe-datawarehouse.fabric.microsoft.com", expected: [ServerType.Fabric, ServerType.DataWarehouse], }, + { + input: "test.crm.dynamics.com", + expected: [ServerType.Dynamics, ServerType.Sql], + }, { input: "localhost", expected: [ServerType.Local, ServerType.Sql] }, { input: "localhost,1234", expected: [ServerType.Local, ServerType.Sql] }, diff --git a/typings/vscode-mssql.d.ts b/typings/vscode-mssql.d.ts index eb6f40595f..432cb25d0a 100644 --- a/typings/vscode-mssql.d.ts +++ b/typings/vscode-mssql.d.ts @@ -1067,6 +1067,9 @@ declare module "vscode-mssql" { sqlDbDnsSuffix: string; dataWarehouseDnsSuffix: string; }; + dataverse: { + dynamicsCrmDnsSuffix: string; + }; } export interface IProviderResources {