Skip to content

Commit a0411e6

Browse files
authored
Remove UsernamePasswordCredential content (#45354)
* Remove UsernamePasswordCredential content * Undo redirect
1 parent e94ab1d commit a0411e6

File tree

3 files changed

+1
-44
lines changed

3 files changed

+1
-44
lines changed

docs/azure/sdk/authentication/additional-methods.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Additional methods to authenticate to Azure from .NET apps
33
description: This article describes additional, less common methods you can use to authenticate your .NET app to Azure resources.
44
ms.topic: how-to
55
ms.custom: devx-track-dotnet, engagement-fy23
6-
ms.date: 08/15/2024
6+
ms.date: 03/14/2025
77
---
88

99
# Additional methods to authenticate to Azure resources from .NET apps
@@ -115,14 +115,3 @@ This method interactively authenticates a user on devices with limited UI (typic
115115
For more information, see [Microsoft identity platform and the OAuth 2.0 device authorization grant flow](/entra/identity-platform/v2-oauth2-device-code).
116116
117117
Device code authentication in a development environment enables the application for all operations allowed by the interactive login credentials. As a result, if you're the owner or administrator of your subscription, your code has inherent access to most resources in that subscription without having to assign any specific permissions. However, you can use this method with a specific client ID, rather than the default, for which you can assign specific permissions.
118-
119-
## Username and password authentication
120-
121-
This method authenticates an application using previously collected credentials and the [UsernamePasswordCredential](/dotnet/api/azure.identity.usernamepasswordcredential) object.
122-
123-
> [!IMPORTANT]
124-
> This method of authentication is discouraged because it's less secure than other flows. Also, this method isn't interactive and is therefore **incompatible with any form of multi-factor authentication or consent prompting.** The application must already have consent from the user or a directory administrator.
125-
>
126-
> Furthermore, this method authenticates only work and school accounts; Microsoft accounts aren't supported. For more information, see [Sign up your organization to use Microsoft Entra ID](/entra/fundamentals/sign-up-organization).
127-
128-
:::code language="csharp" source="../snippets/authentication/additional-auth/username-password/Program.cs" highlight="10-12":::

docs/azure/sdk/snippets/authentication/additional-auth/username-password/Program.cs

Lines changed: 0 additions & 17 deletions
This file was deleted.

docs/azure/sdk/snippets/authentication/additional-auth/username-password/UsernamePassword.csproj

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)