Skip to content

Commit 01bc1b4

Browse files
authored
Obsolete UsernamePasswordCredentialOptions (Azure#48669)
1 parent f2d06e5 commit 01bc1b4

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

sdk/identity/Azure.Identity/api/Azure.Identity.net8.0.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,8 @@ public UsernamePasswordCredential(string username, string password, string tenan
438438
public override Azure.Core.AccessToken GetToken(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
439439
public override System.Threading.Tasks.ValueTask<Azure.Core.AccessToken> GetTokenAsync(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
440440
}
441+
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
442+
[System.ObsoleteAttribute("This credential is deprecated because it doesn't support multifactor authentication (MFA). See https://aka.ms/azsdk/identity/mfa for details about MFA enforcement for Microsoft Entra ID and migration guidance.")]
441443
public partial class UsernamePasswordCredentialOptions : Azure.Identity.TokenCredentialOptions
442444
{
443445
public UsernamePasswordCredentialOptions() { }

sdk/identity/Azure.Identity/api/Azure.Identity.netstandard2.0.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,8 @@ public UsernamePasswordCredential(string username, string password, string tenan
435435
public override Azure.Core.AccessToken GetToken(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
436436
public override System.Threading.Tasks.ValueTask<Azure.Core.AccessToken> GetTokenAsync(Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
437437
}
438+
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
439+
[System.ObsoleteAttribute("This credential is deprecated because it doesn't support multifactor authentication (MFA). See https://aka.ms/azsdk/identity/mfa for details about MFA enforcement for Microsoft Entra ID and migration guidance.")]
438440
public partial class UsernamePasswordCredentialOptions : Azure.Identity.TokenCredentialOptions
439441
{
440442
public UsernamePasswordCredentialOptions() { }

sdk/identity/Azure.Identity/src/Credentials/UsernamePasswordCredentialOptions.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4+
using System;
45
using System.Collections.Generic;
6+
using System.ComponentModel;
57

68
namespace Azure.Identity
79
{
810
/// <summary>
911
/// Options to configure the <see cref="UsernamePasswordCredential"/>.
1012
/// </summary>
13+
[EditorBrowsable(EditorBrowsableState.Never)]
14+
[Obsolete("This credential is deprecated because it doesn't support multifactor authentication (MFA). See https://aka.ms/azsdk/identity/mfa for details about MFA enforcement for Microsoft Entra ID and migration guidance.")]
1115
public class UsernamePasswordCredentialOptions : TokenCredentialOptions, ISupportsTokenCachePersistenceOptions, ISupportsDisableInstanceDiscovery, ISupportsAdditionallyAllowedTenants
1216
{
1317
/// <summary>

0 commit comments

Comments
 (0)