You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ide/work-with-multi-factor-authentication.md
+34-18Lines changed: 34 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Multifactor authentication with Visual Studio sign-ins
3
3
titleSuffix: ""
4
-
ms.date: 05/21/2024
4
+
ms.date: 08/13/2024
5
5
ms.topic: how-to
6
6
description: Use Visual Studio with accounts that require multifactor authentication (MFA) to protect your apps and data with conditional access policies.
7
7
author: anandmeg
@@ -12,18 +12,18 @@ ms.subservice: general-ide
12
12
13
13
# Sign in to Visual Studio with accounts that require multifactor authentication (MFA)
14
14
15
-
In this article, you'll learn how to use Visual Studio with accounts that require multifactor authentication (MFA).
15
+
In this article, you learn to use Visual Studio with accounts that require multifactor authentication (MFA).
16
16
17
17
## Why enable MFA policies?
18
18
19
19
When collaborating with external guest users, it's a good idea to protect your apps and data with **conditional access (CA)** policies such as **multifactor authentication (MFA)**.
20
20
21
21
Once enabled, guest users will need more than just a username and password to access your resources, and must satisfy additional security requirements. MFA policies can be enforced at the tenant, app, or individual guest user level, the same way that they are enabled for members of your own organization.
22
22
23
-
## How is the Visual Studio experience affected by MFA policies?
24
-
Versions of Visual Studio prior to 16.6 may have degraded authentication experiences when used with accounts that have enabled CA policies such as MFA, and are associated with two or more tenants.
25
-
26
-
These issues can cause your instance of Visual Studio to prompt reauthentication multiple times per day. You may have to re-enter your credentials for previously authenticated tenants, even during the course of the same Visual Studio session.
23
+
> [!NOTE]
24
+
> Versions of Visual Studio prior to 16.6 may have degraded authentication experiences when used with accounts that have enabled CA policies such as MFA, and are associated with two or more tenants.
25
+
>
26
+
> These issues can cause your instance of Visual Studio to prompt reauthentication multiple times per day. You may have to re-enter your credentials for previously authenticated tenants, even during the course of the same Visual Studio session.
27
27
28
28
## Using Visual Studio with MFA policies
29
29
@@ -35,7 +35,13 @@ You can access resources secured via CA policies such as MFA in Visual Studio. T
35
35
36
36
::: moniker range="=vs-2022"
37
37
38
-
You can access resources secured via CA policies such as MFA in Visual Studio. To use this enhanced workflow, you'll need to opt into using your system's default web browser or the Windows authentication broker (available in [Visual Studio version 17.5](/visualstudio/releases/2022/release-notes-v17.5), but we recommend using [Visual Studio version 17.7](/visualstudio/releases/2022/release-notes) for an optimal experience) as the mechanism to add and reauthenticate Visual Studio accounts.
38
+
With [Visual Studio 2022 version 17.11](/visualstudio/releases/2022/release-notes), Windows authentication broker is now the default workflow for adding and reauthenticating accounts in Visual Studio.
39
+
40
+
Windows authentication broker uses [Web Account Manager (WAM)](/entra/msal/dotnet/acquiring-tokens/desktop-mobile/wam) and offers many benefits such as security, improved MFA support, and seamless integration between accounts added to the OS and Visual Studio. Using WAM as the authentication mechanism in Visual Studio makes it easier to access resources secured via CA policies such as MFA.
41
+
42
+
:::image type="content" source="media/vs-2022/windows-authentication-broker.png" alt-text="Select web authentication broker from the dropdown.":::
43
+
44
+
If run into any [issues with using WAM](#web-account-manager-wam-errors), we recommend you [use System web browser](#enabling-system-web-browser) as the alternative to add and reauthenticate Visual Studio accounts.
39
45
40
46
::: moniker-end
41
47
@@ -44,16 +50,18 @@ You can access resources secured via CA policies such as MFA in Visual Studio. T
44
50
45
51
::: moniker range="=vs-2022"
46
52
47
-
### Enabling Windows authentication broker
53
+
### Using Windows authentication broker
48
54
49
-
>[!NOTE]
50
-
>Web Account Manager (WAM) is only available on Windows 10 and above, as well as Windows Server 2019 and above.
55
+
To start using WAM as the authentication mechanism in Visual Studio:
51
56
52
-
To enable this workflow, go to Visual Studio's Options dialog **(Tools > Options…)**, select the **Accounts** tab, and then select **Windows authentication broker** from the **Add and reauthenticate accounts using:** dropdown.
57
+
1. Update to [Visual Studio 2022 version 17.11 or later](/visualstudio/releases/2022/release-notes).
58
+
1. Select an account from the WAM dialog when prompted. If your account isn't listed, add it by using **Add an account**.
53
59
54
-
:::image type="content" source="media/vs-2022/windows-authentication-broker.png" alt-text="Select web authentication broker from the dropdown.":::
60
+
:::image type="content" source="media/vs-2022/signing-in-to-visual-studio/sign-in-account-windows-account-manager.png" alt-text="Add an account using the Windows authentication broker workflow.":::
61
+
62
+
You can manage your accounts from the **Account Settings** dialog in Visual Studio.
55
63
56
-
Windows authentication broker uses [Web Account Manager (WAM)](/entra/msal/dotnet/acquiring-tokens/desktop-mobile/wam) and offers many benefits such as security, improved MFA support, and seamless integration between accounts added to the OS and Visual Studio.
64
+
Using Windows Account Manager (WAM) as the authentication mechanism in Visual Studio is the recommended workflow for adding and reauthenticating accounts. However, if run into any [issues with using WAM](#web-account-manager-wam-errors), you can switch to using the system web browser.
> For the best experience, we recommend that you clear your system’s default web browser data before proceeding with this workflow. Additionally, if you have Work or School accounts in your Windows 10 Settings under **Access work or school**, please verify that they are properly authenticated.
64
72
65
-
To enable this workflow, go to Visual Studio's Options dialog **(Tools > Options…)**, select the **Accounts** tab and select **System web browser** from the **Add and reauthenticate accounts using:** dropdown.
73
+
To enable the **system web browser** workflow, go to Visual Studio's Options dialog **(Tools > Options…)**, select the **Accounts** tab and select **System web browser** from the **Add and reauthenticate accounts using:** dropdown.
66
74
67
75
:::image type="content" source="media/vs-2022/select-system-web-browser.png" alt-text="Select system web browser from the menu.":::
68
76
69
77
### Sign into additional accounts with MFA policies
70
78
79
+
::: moniker range="<=vs-2019"
80
+
81
+
Once the system web browser workflow is enabled, you can sign in or add accounts to Visual Studio as you normally would, via the Account Settings dialog **(File > Account Settings…)**.
82
+
83
+
::: moniker-end
84
+
71
85
::: moniker range="=vs-2022"
72
86
87
+
You can sign in or add accounts to Visual Studio via the [Profile Card](signing-in-to-visual-studio.md#add-and-switch-user-accounts-in-visual-studio) or the Account Settings dialog **(File > Account Settings…)**.
88
+
73
89
**Windows authentication broker**
74
90
75
-
Once the Windows authentication broker workflow is enabled, you can sign in or add accounts to Visual Studio as you normally would, via the Account Settings dialog **(File > Account Settings…)**. Web Account Manager (WAM) simplifies the sign in experience by allowing users to log in with accounts known to Windows, such as the account signed into your Windows session.
91
+
Once the Windows authentication broker workflow is enabled, you can sign in or add accounts to Visual Studio as you normally would. Web Account Manager (WAM) simplifies the sign in experience by allowing users to log in with accounts known to Windows, such as the account signed into your Windows session.
76
92
77
93
:::image type="content" source="media/vs-2022/add-personalization-account-web-account-manager.png" alt-text="Add additional accounts to Visual Studio with the Windows authentication broker workflow.":::
78
94
79
95
**System web browser**
80
96
97
+
Once the system web browser workflow is enabled, you can sign in or add accounts to Visual Studio as you normally would.
98
+
81
99
::: moniker-end
82
100
83
-
Once the system web browser workflow is enabled, you can sign in or add accounts to Visual Studio as you normally would, via the Account Settings dialog **(File > Account Settings…)**.
84
-
</br>
85
101
:::image type="content" source="media/vs-2022/add-personalization-account.png" alt-text="Add a new personalization account to Visual Studio." border="false":::
86
102
87
103
This action will open your system's default web browser, ask you to sign into your account, and validate any required MFA policy.
@@ -152,7 +168,7 @@ Starting with Visual Studio 2022 version 17.5, if you see the previous error dia
152
168
::: moniker range="=vs-2022"
153
169
### Web Account Manager (WAM) errors
154
170
155
-
If you run into errors when using the [Windows authentication broker workflow for signing in to Visual Studio](#enabling-windows-authentication-broker), follow the action listed on the error dialog to resolve or report the issue. Use the links on the dialog to learn more about the error or to see error logs.
171
+
If you run into errors when using the [Windows authentication broker workflow for signing in to Visual Studio](#using-windows-authentication-broker), follow the action listed on the error dialog to resolve or report the issue. Use the links on the dialog to learn more about the error or to see error logs.
156
172
157
173
For example, if you see the following error dialog, you can resolve the issue by selecting **change authentication mechanism** to open **Sign-in options** and switch to the [system web browser](#enabling-system-web-browser).
0 commit comments