Skip to content

Commit

Permalink
Mark AzureAuthorityHosts.AzureGermany as Obsolete. (#46371)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eagle3386 authored Oct 16, 2024
1 parent 81939fb commit 28bae8e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public AuthorizationCodeCredentialOptions() { }
public static partial class AzureAuthorityHosts
{
public static System.Uri AzureChina { get { throw null; } }
[System.ObsoleteAttribute("Microsoft Cloud Germany was closed on October 29th, 2021.")]
public static System.Uri AzureGermany { get { throw null; } }
public static System.Uri AzureGovernment { get { throw null; } }
public static System.Uri AzurePublicCloud { get { throw null; } }
Expand Down
1 change: 1 addition & 0 deletions sdk/identity/Azure.Identity/src/AzureAuthorityHosts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public static class AzureAuthorityHosts
/// <summary>
/// The host of the Microsoft Entra authority for tenants in the Azure German Cloud.
/// </summary>
[Obsolete("Microsoft Cloud Germany was closed on October 29th, 2021.")]
public static Uri AzureGermany { get; } = new Uri(AzureGermanyHostUrl);

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,6 @@ public static IEnumerable<object[]> AuthorityHostValues()
// params
// az thrown Exception message, expected message, expected exception
yield return new object[] { AzureAuthorityHosts.AzureChina };
yield return new object[] { AzureAuthorityHosts.AzureGermany };
yield return new object[] { AzureAuthorityHosts.AzureGovernment };
yield return new object[] { AzureAuthorityHosts.AzurePublicCloud };
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void EnvAuthorityHost()
[Test]
public void CustomAuthorityHost()
{
string envHostValue = AzureAuthorityHosts.AzureGermany.ToString();
string envHostValue = AzureAuthorityHosts.AzureGovernment.ToString();

using (new TestEnvVar("AZURE_AUTHORITY_HOST", envHostValue))
{
Expand Down

0 comments on commit 28bae8e

Please sign in to comment.