From d04538c1436fd0148ef835800a77a09a7ab15278 Mon Sep 17 00:00:00 2001 From: Matt Metcalf Date: Fri, 10 Apr 2026 11:03:49 -0700 Subject: [PATCH 1/3] Add App Config to Azure Environment --- .../Environment/AddAzureRMEnvironment.cs | 16 +++++++++ .../Environment/SetAzureRMEnvironment.cs | 12 +++++++ .../Models/PSAzureEnvironment.cs | 35 +++++++++++++++++++ 3 files changed, 63 insertions(+) diff --git a/src/Accounts/Accounts/Environment/AddAzureRMEnvironment.cs b/src/Accounts/Accounts/Environment/AddAzureRMEnvironment.cs index c24359a22a55..1266ded741a7 100644 --- a/src/Accounts/Accounts/Environment/AddAzureRMEnvironment.cs +++ b/src/Accounts/Accounts/Environment/AddAzureRMEnvironment.cs @@ -191,6 +191,18 @@ public string DataLakeAudience HelpMessage = "The resource identifier of the Azure Attestation service that is the recipient of the requested token.")] public string AzureAttestationServiceEndpointResourceId { get; set; } + [Parameter(ParameterSetName = EnvironmentPropertiesParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "Dns suffix of Azure App Configuration.")] + [Parameter(ParameterSetName = MetadataParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "Dns suffix of Azure App Configuration.")] + public string AzureAppConfigurationEndpointSuffix { get; set; } + + [Parameter(ParameterSetName = EnvironmentPropertiesParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The resource identifier of the Azure App Configuration service that is the recipient of the requested token.")] + [Parameter(ParameterSetName = MetadataParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The resource identifier of the Azure App Configuration service that is the recipient of the requested token.")] + public string AzureAppConfigurationEndpointResourceId { get; set; } + [Parameter(ParameterSetName = EnvironmentPropertiesParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Dns suffix of Azure Synapse Analytics.")] [Parameter(ParameterSetName = MetadataParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true, @@ -387,6 +399,10 @@ public override void ExecuteCmdlet() nameof(AzureAttestationServiceEndpointSuffix)); SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AzureAttestationServiceEndpointResourceId, nameof(AzureAttestationServiceEndpointResourceId)); + SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AzureAppConfigurationEndpointSuffix, + nameof(AzureAppConfigurationEndpointSuffix)); + SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AzureAppConfigurationEndpointResourceId, + nameof(AzureAppConfigurationEndpointResourceId)); SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AzureSynapseAnalyticsEndpointSuffix, nameof(AzureSynapseAnalyticsEndpointSuffix)); SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AzureSynapseAnalyticsEndpointResourceId, diff --git a/src/Accounts/Accounts/Environment/SetAzureRMEnvironment.cs b/src/Accounts/Accounts/Environment/SetAzureRMEnvironment.cs index 1dfff7384f01..f29d6c164a10 100644 --- a/src/Accounts/Accounts/Environment/SetAzureRMEnvironment.cs +++ b/src/Accounts/Accounts/Environment/SetAzureRMEnvironment.cs @@ -174,6 +174,14 @@ public string DataLakeAudience HelpMessage = "The resource identifier of the Azure Attestation service that is the recipient of the requested token.")] public string AzureAttestationServiceEndpointResourceId { get; set; } + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "Dns suffix of Azure App Configuration.")] + public string AzureAppConfigurationEndpointSuffix { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The resource identifier of the Azure App Configuration service that is the recipient of the requested token.")] + public string AzureAppConfigurationEndpointResourceId { get; set; } + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Dns suffix of Azure Synapse Analytics.")] public string AzureSynapseAnalyticsEndpointSuffix { get; set; } @@ -358,6 +366,10 @@ public override void ExecuteCmdlet() nameof(AzureAttestationServiceEndpointSuffix)); SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AzureAttestationServiceEndpointResourceId, nameof(AzureAttestationServiceEndpointResourceId)); + SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AzureAppConfigurationEndpointSuffix, + nameof(AzureAppConfigurationEndpointSuffix)); + SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AzureAppConfigurationEndpointResourceId, + nameof(AzureAppConfigurationEndpointResourceId)); SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AzureSynapseAnalyticsEndpointSuffix, nameof(AzureSynapseAnalyticsEndpointSuffix)); SetEndpointIfBound(newEnvironment, AzureEnvironment.Endpoint.ContainerRegistryEndpointSuffix, diff --git a/src/Accounts/Authentication.ResourceManager/Models/PSAzureEnvironment.cs b/src/Accounts/Authentication.ResourceManager/Models/PSAzureEnvironment.cs index b239df2bd1c5..c08bfbdcabb8 100644 --- a/src/Accounts/Authentication.ResourceManager/Models/PSAzureEnvironment.cs +++ b/src/Accounts/Authentication.ResourceManager/Models/PSAzureEnvironment.cs @@ -119,6 +119,9 @@ public PSAzureEnvironment(PSObject other) AzureAttestationServiceEndpointResourceId = other.GetProperty(nameof(AzureAttestationServiceEndpointResourceId)); AzureAttestationServiceEndpointSuffix = other.GetProperty(nameof(AzureAttestationServiceEndpointSuffix)); + AzureAppConfigurationEndpointResourceId = + other.GetProperty(nameof(AzureAppConfigurationEndpointResourceId)); + AzureAppConfigurationEndpointSuffix = other.GetProperty(nameof(AzureAppConfigurationEndpointSuffix)); AzureSynapseAnalyticsEndpointResourceId = other.GetProperty(nameof(AzureSynapseAnalyticsEndpointResourceId)); AzureSynapseAnalyticsEndpointSuffix = other.GetProperty(nameof(AzureSynapseAnalyticsEndpointSuffix)); @@ -342,6 +345,36 @@ public string AzureAttestationServiceEndpointResourceId } } + /// + /// The domain name suffix for Azure App Configuration + /// + public string AzureAppConfigurationEndpointSuffix + { + get + { + return this.GetEndpoint(AzureEnvironment.ExtendedEndpoint.AzureAppConfigurationEndpointSuffix); + } + set + { + this.SetEndpoint(AzureEnvironment.ExtendedEndpoint.AzureAppConfigurationEndpointSuffix, value); + } + } + + /// + /// Gets or sets the resource Id to use for contacting the Azure App Configuration endpoint + /// + public string AzureAppConfigurationEndpointResourceId + { + get + { + return this.GetEndpoint(AzureEnvironment.ExtendedEndpoint.AzureAppConfigurationEndpointResourceId); + } + set + { + this.SetEndpoint(AzureEnvironment.ExtendedEndpoint.AzureAppConfigurationEndpointResourceId, value); + } + } + /// /// The domain name suffix for Azure Synapse Analytics /// @@ -414,6 +447,8 @@ public override bool Equals(object obj) && AzureOperationalInsightsEndpoint == other.AzureOperationalInsightsEndpoint && AzureAttestationServiceEndpointResourceId == other.AzureAttestationServiceEndpointResourceId && AzureAttestationServiceEndpointSuffix == other.AzureAttestationServiceEndpointSuffix + && AzureAppConfigurationEndpointResourceId == other.AzureAppConfigurationEndpointResourceId + && AzureAppConfigurationEndpointSuffix == other.AzureAppConfigurationEndpointSuffix && ContainerRegistryEndpointSuffix == other.ContainerRegistryEndpointSuffix; } From bf00f3542cf3ea1780e73229dde58001a1682661 Mon Sep 17 00:00:00 2001 From: Matt Metcalf Date: Fri, 10 Apr 2026 15:18:45 -0700 Subject: [PATCH 2/3] Update EnvironmentCmdletTestsExtension.cs --- src/Accounts/Accounts.Test/EnvironmentCmdletTestsExtension.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Accounts/Accounts.Test/EnvironmentCmdletTestsExtension.cs b/src/Accounts/Accounts.Test/EnvironmentCmdletTestsExtension.cs index 1be5e1d42c90..9612416204c1 100644 --- a/src/Accounts/Accounts.Test/EnvironmentCmdletTestsExtension.cs +++ b/src/Accounts/Accounts.Test/EnvironmentCmdletTestsExtension.cs @@ -132,6 +132,8 @@ public static PSAzureEnvironment GetAzureChinaCloudEndpoints() env.SetProperty("ManagedHsmServiceEndpointSuffix", "managedhsm.azure.cn"); env.SetProperty("MicrosoftGraphEndpointResourceId", "https://microsoftgraph.chinacloudapi.cn/"); env.SetProperty("MicrosoftGraphUrl", "https://microsoftgraph.chinacloudapi.cn"); + env.SetProperty("AzureAppConfigurationEndpointSuffix", "azconfig.azure.cn"); + env.SetProperty("AzureAppConfigurationEndpointResourceId", "https://azconfig.azure.cn"); env.SetProperty("ContainerRegistryEndpointResourceId", "https://management.chinacloudapi.cn"); return env; } @@ -184,6 +186,8 @@ public static PSAzureEnvironment GetAzureUSGovernmentEndpoints() env.SetProperty("ManagedHsmServiceEndpointSuffix", "managedhsm.usgovcloudapi.net"); env.SetProperty("MicrosoftGraphEndpointResourceId", "https://graph.microsoft.us/"); env.SetProperty("MicrosoftGraphUrl", "https://graph.microsoft.us"); + env.SetProperty("AzureAppConfigurationEndpointSuffix", "azconfig.azure.us"); + env.SetProperty("AzureAppConfigurationEndpointResourceId", "https://azconfig.azure.us"); env.SetProperty("ContainerRegistryEndpointResourceId", "https://management.usgovcloudapi.net"); return env; } From d5b9fc32a318ac849df743549424ca400a88c7b7 Mon Sep 17 00:00:00 2001 From: Matt Metcalf Date: Mon, 13 Apr 2026 13:14:42 -0700 Subject: [PATCH 3/3] review comments --- src/Accounts/Accounts/ChangeLog.md | 2 ++ src/Accounts/Accounts/Environment/AddAzureRMEnvironment.cs | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Accounts/Accounts/ChangeLog.md b/src/Accounts/Accounts/ChangeLog.md index 9a6919b9fdb3..b7904cc06f1a 100644 --- a/src/Accounts/Accounts/ChangeLog.md +++ b/src/Accounts/Accounts/ChangeLog.md @@ -19,6 +19,8 @@ --> ## Upcoming Release +* Added `AzureAppConfigurationEndpointSuffix` and `AzureAppConfigurationEndpointResourceId` parameters to `Add-AzEnvironment` and `Set-AzEnvironment` + - Users can now configure Azure App Configuration endpoints when adding or updating custom environments ## Version 5.3.4 * Improved SSH certificate authentication for Az SSH cmdlets across all Azure clouds. diff --git a/src/Accounts/Accounts/Environment/AddAzureRMEnvironment.cs b/src/Accounts/Accounts/Environment/AddAzureRMEnvironment.cs index 1266ded741a7..711e0e3a2dd4 100644 --- a/src/Accounts/Accounts/Environment/AddAzureRMEnvironment.cs +++ b/src/Accounts/Accounts/Environment/AddAzureRMEnvironment.cs @@ -193,14 +193,10 @@ public string DataLakeAudience [Parameter(ParameterSetName = EnvironmentPropertiesParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Dns suffix of Azure App Configuration.")] - [Parameter(ParameterSetName = MetadataParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true, - HelpMessage = "Dns suffix of Azure App Configuration.")] public string AzureAppConfigurationEndpointSuffix { get; set; } [Parameter(ParameterSetName = EnvironmentPropertiesParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource identifier of the Azure App Configuration service that is the recipient of the requested token.")] - [Parameter(ParameterSetName = MetadataParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true, - HelpMessage = "The resource identifier of the Azure App Configuration service that is the recipient of the requested token.")] public string AzureAppConfigurationEndpointResourceId { get; set; } [Parameter(ParameterSetName = EnvironmentPropertiesParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true,