Skip to content

Commit 5dfe397

Browse files
Revert "Deprecate 'Active Directory Password' authentication mode. (#3219)" (#3257)
This reverts commit 325ca56.
1 parent bf65632 commit 5dfe397

File tree

18 files changed

+5
-51
lines changed

18 files changed

+5
-51
lines changed

doc/snippets/Microsoft.Data.SqlClient/ActiveDirectoryAuthenticationProvider.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180
<remarks>
181181
The supported authentication modes with <see cref="T:Microsoft.Data.SqlClient.ActiveDirectoryAuthenticationProvider" /> are:
182182
<list type="bullet">
183-
<item>Active Directory Password (deprecated)</item>
183+
<item>Active Directory Password</item>
184184
<item>Active Directory Integrated</item>
185185
<item>Active Directory Interactive</item>
186186
<item>Active Directory Service Principal</item>

doc/snippets/Microsoft.Data.SqlClient/SqlAuthenticationMethod.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<value>1</value>
1313
</SqlPassword>
1414
<ActiveDirectoryPassword>
15-
<summary>The authentication method uses Active Directory Password. Use Active Directory Password to connect to a SQL Database using a Microsoft Entra principal name and password. This authentication method is now deprecated, and will be removed in a future release.</summary>
15+
<summary>The authentication method uses Active Directory Password. Use Active Directory Password to connect to a SQL Database using a Microsoft Entra principal name and password.</summary>
1616
<value>2</value>
1717
</ActiveDirectoryPassword>
1818
<ActiveDirectoryIntegrated>

doc/snippets/Microsoft.Data.SqlClient/SqlConnection.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,9 +1330,9 @@
13301330
Valid values are:
13311331
</para>
13321332
<list type="bullet">
1333-
<item><c>Active Directory Password (deprecated)</c></item>
13341333
<item><c>Active Directory Integrated</c></item>
13351334
<item><c>Active Directory Interactive</c></item>
1335+
<item><c>Active Directory Password</c></item>
13361336
<item><c>Active Directory Service Principal</c></item>
13371337
<item><c>Active Directory Device Code Flow</c></item>
13381338
<item><c>Active Directory Managed Identity</c></item>
@@ -1875,7 +1875,7 @@
18751875
<item>.database.fabric.microsoft.com</item>
18761876
</list>
18771877
</item>
1878-
<item><c>Authentication</c> is one of the 'Active Directory' authentication types.</item>
1878+
<item><c>Authentication</c> is 'Active Directory Password' or 'Active Directory Integrated'</item>
18791879
</list>
18801880
</item>
18811881
<item><c>true</c> in all other cases.</item>

doc/snippets/Microsoft.Data.SqlClient/SqlConnectionStringBuilder.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1642,7 +1642,7 @@
16421642
</list>
16431643
</item>
16441644
<item>
1645-
<c>Authentication</c> is one of the 'Active Directory' authentication types.
1645+
<c>Authentication</c> is 'Active Directory Password' or 'Active Directory Integrated'
16461646
</item>
16471647
<item>Otherwise it defaults to <c>true</c>.</item>
16481648
</list>

src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ public enum SqlAuthenticationMethod
190190
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlAuthenticationMethod.xml' path='docs/members[@name="SqlAuthenticationMethod"]/SqlPassword/*'/>
191191
SqlPassword = 1,
192192
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlAuthenticationMethod.xml' path='docs/members[@name="SqlAuthenticationMethod"]/ActiveDirectoryPassword/*'/>
193-
[System.Obsolete("ActiveDirectoryPassword is deprecated.")]
194193
ActiveDirectoryPassword = 2,
195194
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlAuthenticationMethod.xml' path='docs/members[@name="SqlAuthenticationMethod"]/ActiveDirectoryIntegrated/*'/>
196195
ActiveDirectoryIntegrated = 3,

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlConnection.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2001,9 +2001,7 @@ private bool TryOpen(TaskCompletionSource<DbConnectionInternal> retry, SqlConnec
20012001

20022002
if (connectionOptions != null &&
20032003
(connectionOptions.Authentication == SqlAuthenticationMethod.SqlPassword ||
2004-
#pragma warning disable 0618
20052004
connectionOptions.Authentication == SqlAuthenticationMethod.ActiveDirectoryPassword ||
2006-
#pragma warning restore 0618
20072005
connectionOptions.Authentication == SqlAuthenticationMethod.ActiveDirectoryServicePrincipal) &&
20082006
(!connectionOptions._hasUserIdKeyword || !connectionOptions._hasPasswordKeyword) &&
20092007
_credential == null)

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlInternalConnectionTds.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,9 +1329,7 @@ private void Login(ServerInfo server, TimeoutTimer timeout, string newPassword,
13291329
// If the workflow being used is Active Directory Authentication and server's prelogin response
13301330
// for FEDAUTHREQUIRED option indicates Federated Authentication is required, we have to insert FedAuth Feature Extension
13311331
// in Login7, indicating the intent to use Active Directory Authentication for SQL Server.
1332-
#pragma warning disable 0618
13331332
if (ConnectionOptions.Authentication == SqlAuthenticationMethod.ActiveDirectoryPassword
1334-
#pragma warning restore 0618
13351333
|| ConnectionOptions.Authentication == SqlAuthenticationMethod.ActiveDirectoryInteractive
13361334
|| ConnectionOptions.Authentication == SqlAuthenticationMethod.ActiveDirectoryDeviceCodeFlow
13371335
|| ConnectionOptions.Authentication == SqlAuthenticationMethod.ActiveDirectoryServicePrincipal
@@ -2488,9 +2486,7 @@ internal SqlFedAuthToken GetFedAuthToken(SqlFedAuthInfo fedAuthInfo)
24882486
_activeDirectoryAuthTimeoutRetryHelper.CachedToken = _fedAuthToken;
24892487
}
24902488
break;
2491-
#pragma warning disable 0618
24922489
case SqlAuthenticationMethod.ActiveDirectoryPassword:
2493-
#pragma warning restore 0618
24942490
case SqlAuthenticationMethod.ActiveDirectoryServicePrincipal:
24952491
if (_activeDirectoryAuthTimeoutRetryHelper.State == ActiveDirectoryAuthenticationTimeoutRetryState.Retrying)
24962492
{

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8369,9 +8369,7 @@ internal int WriteFedAuthFeatureRequest(FederatedAuthenticationFeatureExtensionD
83698369
byte workflow = 0x00;
83708370
switch (fedAuthFeatureData.authentication)
83718371
{
8372-
#pragma warning disable 0618
83738372
case SqlAuthenticationMethod.ActiveDirectoryPassword:
8374-
#pragma warning restore 0618
83758373
workflow = TdsEnums.MSALWORKFLOW_ACTIVEDIRECTORYPASSWORD;
83768374
break;
83778375
case SqlAuthenticationMethod.ActiveDirectoryIntegrated:

src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ public enum SqlAuthenticationMethod
129129
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlAuthenticationMethod.xml' path='docs/members[@name="SqlAuthenticationMethod"]/SqlPassword/*'/>
130130
SqlPassword = 1,
131131
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlAuthenticationMethod.xml' path='docs/members[@name="SqlAuthenticationMethod"]/ActiveDirectoryPassword/*'/>
132-
[System.Obsolete("ActiveDirectoryPassword is deprecated.")]
133132
ActiveDirectoryPassword = 2,
134133
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlAuthenticationMethod.xml' path='docs/members[@name="SqlAuthenticationMethod"]/ActiveDirectoryIntegrated/*'/>
135134
ActiveDirectoryIntegrated = 3,

src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlConnection.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2058,9 +2058,7 @@ private bool TryOpen(TaskCompletionSource<DbConnectionInternal> retry, SqlConnec
20582058

20592059
if (connectionOptions != null &&
20602060
(connectionOptions.Authentication == SqlAuthenticationMethod.SqlPassword ||
2061-
#pragma warning disable 0618
20622061
connectionOptions.Authentication == SqlAuthenticationMethod.ActiveDirectoryPassword ||
2063-
#pragma warning restore 0618
20642062
connectionOptions.Authentication == SqlAuthenticationMethod.ActiveDirectoryServicePrincipal) &&
20652063
(!connectionOptions._hasUserIdKeyword || !connectionOptions._hasPasswordKeyword) &&
20662064
_credential == null)

0 commit comments

Comments
 (0)