diff --git a/src/Authentication.Abstractions.Test/AzureEnvironmentTests.cs b/src/Authentication.Abstractions.Test/AzureEnvironmentTests.cs index 0a58a14fd0..fe984ac0b2 100644 --- a/src/Authentication.Abstractions.Test/AzureEnvironmentTests.cs +++ b/src/Authentication.Abstractions.Test/AzureEnvironmentTests.cs @@ -70,7 +70,7 @@ public void TestArmCloudMetadata20220901Init() else { Assert.Equal(AzureEnvironment.TypeBuiltIn, env.Type); - Assert.NotEmpty(env.GalleryUrl); + Assert.Null(env.GalleryUrl); } Assert.EndsWith("/", env.ServiceManagementUrl); Assert.StartsWith(".", env.SqlDatabaseDnsSuffix); diff --git a/src/Authentication.Abstractions/AzureEnvironment.BuiltIn.cs b/src/Authentication.Abstractions/AzureEnvironment.BuiltIn.cs index d4218841a4..af1bdb486e 100644 --- a/src/Authentication.Abstractions/AzureEnvironment.BuiltIn.cs +++ b/src/Authentication.Abstractions/AzureEnvironment.BuiltIn.cs @@ -38,7 +38,6 @@ private static AzureEnvironment GetBuiltInAzureCloud() ActiveDirectoryAuthority = AzureEnvironmentConstants.AzureActiveDirectoryEndpoint, ActiveDirectoryServiceEndpointResourceId = AzureEnvironmentConstants.AzureServiceEndpoint, StorageEndpointSuffix = AzureEnvironmentConstants.AzureStorageEndpointSuffix, - GalleryUrl = AzureEnvironmentConstants.GalleryEndpoint, SqlDatabaseDnsSuffix = AzureEnvironmentConstants.AzureSqlDatabaseDnsSuffix, GraphUrl = AzureEnvironmentConstants.AzureGraphEndpoint, TrafficManagerDnsSuffix = AzureEnvironmentConstants.AzureTrafficManagerDnsSuffix, @@ -80,7 +79,6 @@ private static AzureEnvironment GetBuiltInChinaAzureCloud() ActiveDirectoryAuthority = AzureEnvironmentConstants.ChinaActiveDirectoryEndpoint, ActiveDirectoryServiceEndpointResourceId = AzureEnvironmentConstants.ChinaServiceEndpoint, StorageEndpointSuffix = AzureEnvironmentConstants.ChinaStorageEndpointSuffix, - GalleryUrl = AzureEnvironmentConstants.GalleryEndpoint, SqlDatabaseDnsSuffix = AzureEnvironmentConstants.ChinaSqlDatabaseDnsSuffix, GraphUrl = AzureEnvironmentConstants.ChinaGraphEndpoint, TrafficManagerDnsSuffix = AzureEnvironmentConstants.ChinaTrafficManagerDnsSuffix, @@ -120,7 +118,6 @@ private static AzureEnvironment GetBuiltInUSGovernmentCloud() ActiveDirectoryAuthority = AzureEnvironmentConstants.USGovernmentActiveDirectoryEndpoint, ActiveDirectoryServiceEndpointResourceId = AzureEnvironmentConstants.USGovernmentServiceEndpoint, StorageEndpointSuffix = AzureEnvironmentConstants.USGovernmentStorageEndpointSuffix, - GalleryUrl = AzureEnvironmentConstants.GalleryEndpoint, SqlDatabaseDnsSuffix = AzureEnvironmentConstants.USGovernmentSqlDatabaseDnsSuffix, GraphUrl = AzureEnvironmentConstants.USGovernmentGraphEndpoint, TrafficManagerDnsSuffix = AzureEnvironmentConstants.USGovernmentTrafficManagerDnsSuffix, diff --git a/src/Authentication.Abstractions/AzureEnvironmentConstants.cs b/src/Authentication.Abstractions/AzureEnvironmentConstants.cs index 5d8d43ebf5..04ef3f28b5 100644 --- a/src/Authentication.Abstractions/AzureEnvironmentConstants.cs +++ b/src/Authentication.Abstractions/AzureEnvironmentConstants.cs @@ -47,8 +47,11 @@ public static class AzureEnvironmentConstants /// /// Template gallery endpoints /// + [Obsolete("Gallery endpoint is removed from ARM metadata.")] public const string GalleryEndpoint = "https://gallery.azure.com/"; + [Obsolete("Gallery endpoint is removed from ARM metadata.")] public const string ChinaGalleryEndpoint = "https://gallery.chinacloudapi.cn/"; + [Obsolete("Gallery endpoint is removed from ARM metadata.")] public const string USGovernmentGalleryEndpoint = "https://gallery.usgovcloudapi.net/"; [Obsolete("Microsoft Cloud Germany was closed on October 29th, 2021.")] public const string GermanGalleryEndpoint = "https://gallery.cloudapi.de/";