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/signing-in-to-visual-studio.md
+30-11Lines changed: 30 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Sign in
3
3
description: Learn why to sign in to Visual Studio, how to sign in, and how to add and switch user accounts.
4
4
ms.custom: "contperf-fy21q1"
5
-
ms.date: 04/26/2023
5
+
ms.date: 05/16/2023
6
6
ms.topic: how-to
7
7
ms.assetid: b9531c25-e4cf-43ae-b331-a9f31a8cd171
8
8
author: anandmeg
@@ -40,6 +40,7 @@ While you don't have to sign in, there are many advantages to doing so.
40
40
|[Get 'Visual Studio Dev Essentials'](https://visualstudio.microsoft.com/dev-essentials/)|This program includes free software, training, support, and more.|
41
41
42
42
<aname="sign-in"></a>
43
+
43
44
## Sign in with a Microsoft or organizational account
44
45
45
46
::: moniker range="<=vs-2019"
@@ -61,11 +62,11 @@ While you don't have to sign in, there are many advantages to doing so.
61
62
62
63
::: moniker-end
63
64
64
-
2. Choose a Microsoft account or a work or school account. If you don't have one, [create a Microsoft account for free](https://support.microsoft.com/help/4026324/microsoft-account-how-to-create) by selecting the link near the **Sign in** button.
65
+
2. Choose a Microsoft account or a work or school account. If you don't have one, you can [create a Microsoft account for free](https://support.microsoft.com/help/4026324/microsoft-account-how-to-create).
65
66
66
67
3. Choose your preferred color theme and other UI settings. Visual Studio [remembers these settings and synchronizes](../ide/synchronized-settings-in-visual-studio.md) them across all Visual Studio environments you have signed in to. You can change the settings later if you open the **Tools** > **Options** menu in Visual Studio.
67
68
68
-
You can see that you're successfully signed in the upper-right corner of the Visual Studio environment. Unless you sign out, you're automatically signed in to Visual Studio whenever you start it, and any changes to synchronized settings are automatically applied.
69
+
You can see that you're successfully signed in the upper-right corner of the Visual Studio environment. Unless you sign out, you're automatically signed in to Visual Studio whenever you start it, and any changes to synchronized settings are automatically applied.
69
70
70
71
::: moniker range="<=vs-2019"
71
72
@@ -80,13 +81,15 @@ While you don't have to sign in, there are many advantages to doing so.
80
81
::: moniker-end
81
82
82
83
<aname="profile"></a>
84
+
83
85
## Update your account profile
84
86
85
87
1. Go to **File > Account Settings...** and select the **Manage Visual Studio profile** link.
86
88
1. In the browser window, select **Edit profile** and change the settings that you want.
87
89
1. When you're done, select **Save changes**.
88
90
89
91
<aname="add-and-switch"></a>
92
+
90
93
## Add and switch user accounts
91
94
92
95
If you have multiple Microsoft accounts and/or work or school accounts, you can add them all to Visual Studio so that you can access the resources from any account without having to sign in to it separately.
@@ -103,9 +106,7 @@ After you add multiple accounts on one machine, that set of accounts roams with
103
106
To add an additional account to Visual Studio:
104
107
105
108
1. Choose **File** > **Account Settings**.
106
-
107
109
1. From **All Accounts**, choose an account by using the **+** or the **Add** dropdown.
108
-
109
110
1. On the **Sign in to your account** page, select the account or choose **Use another account**. Follow the prompts to enter the new account credentials.
110
111
111
112
(Optional) Now you use the Add Connected Service dialog and see the Azure services associated with the account you just added. You should see all the services associated with the specified subscription. Even though you're not currently signed into Visual Studio with the second account, you are signed in to that account's services and resources. [Learn more about accessing the resources associated with accounts in Visual Studio](./sign-in-access-multiple-accounts.md).
@@ -116,13 +117,15 @@ To add an additional account to Visual Studio:
116
117
117
118
To add an additional account to Visual Studio:
118
119
119
-
1.Choose **File** > **Account Settings**.
120
-
121
-
1.From **All Accounts**, choose an account by using the **+ Add** dropdown.
120
+
1.Select the icon with your profile name in the upper-right corner of the Visual Studio environment.
121
+
1. Select **Add another account** and then choose an account to sign into.
122
+
1.On the **Sign in to your account** page, select the account or choose **Use another account**. Follow the prompts to enter the new account credentials.
122
123
123
-
1. On the **Sign in** page, select the account or choose**Use a different account**. Follow the prompts to enter the new account credentials.
124
+
You can also add an additional account from the**Account settings** dialog:
124
125
125
-
(Optional) Now you use the Add Connected Service dialog and see the Azure services associated with the account you just added. You should see all the services associated with the specified subscription. Even though you're not currently signed into Visual Studio with the second account, you are signed in to that account's services and resources. [Learn more about accessing the resources associated with accounts in Visual Studio](./sign-in-access-multiple-accounts.md).
126
+
1. Select the icon with your profile name in the upper-right corner of the Visual Studio environment. Then, select **Account settings** to manage your accounts. You can also open the Account Settings dialog by going to **File** > **Account Settings...**.
127
+
1. From **All Accounts**, choose an account by using the **+ Add** dropdown.
128
+
1. On the **Sign in to your account** page, select the account or choose **Use another account**. Follow the prompts to enter the new account credentials.
126
129
127
130
::: moniker-end
128
131
@@ -158,6 +161,22 @@ You can also access resources secured via CA policies such as MFA. To use this e
158
161
159
162
## Sign out of your account
160
163
164
+
::: moniker range="<=vs-2019"
165
+
161
166
1. Select the icon with your profile name in the upper-right corner of the Visual Studio environment.
162
-
1. Select **Account settings...**.
167
+
1. Select **Account settings....**.
163
168
1. Select **Sign out**.
169
+
170
+
::: moniker-end
171
+
172
+
::: moniker range="vs-2022"
173
+
174
+
Select the icon with your profile name in the upper-right corner of the Visual Studio environment and then select **Sign out**.
175
+
176
+
:::image type="content" source="../ide/media/vs-2022/visual-studio-profile-sign-out.png" alt-text="Screenshot showing Visual Studio sign out option":::
177
+
178
+
You can also sign out by using the Account settings dialog. Select **Account settings** and then select **Sign out**. You can also open the Account Settings dialog by going to **File** > **Account Settings...**.
179
+
180
+
:::image type="content" source="../ide/media/vs-2022/visual-studio-sign-out-vs-2022.png" alt-text="Screenshot showing Visual Studio sign out on Account Settings dialog.":::
description: "Learn how to use Visual Studio with GitHub accounts."
6
-
ms.custom: devdivchpfy22
7
6
author: anandmeg
8
7
ms.author: meghaanand
9
8
manager: jmartens
@@ -22,12 +21,32 @@ If you have a public GitHub or GitHub Enterprise account, you can add it to your
22
21
23
22
You can add your public GitHub account if you're already signed into Visual Studio with a Microsoft account, work account, or school account.
24
23
25
-
1. Select the icon with your initials in the upper-right corner of the Visual Studio environment. Then, select **Account settings...** to manage your accounts. You can also open the Account Settings dialog by going to **File** > **Account Settings...**.
24
+
::: moniker range="vs-2022"
26
25
27
-
:::image type="content" source="../ide/media/vs-2022/account-settings-1.png" alt-text="Screenshot of the Account Settings window.":::
26
+
1. Select the icon with your profile name in the upper-right corner of the Visual Studio environment, select **Add another account** and then select **GitHub**.
27
+
28
+
:::image type="content" source="../ide/media/vs-2022/add-another-account-github.png" alt-text="Screenshot of using Add another account option to add a GitHub account.":::
29
+
30
+
1. You'll be redirected to the browser, where you can sign in with your GitHub credentials. After you sign in, you'll get a success window in the browser, and you can return to Visual Studio.
31
+
32
+
:::image type="content" source="../ide/media/github-success-signin.png" alt-text="Screenshot of the success window in browser.":::
33
+
34
+
1. You'll have both accounts present in your sign in profile.
35
+
36
+
:::image type="content" source="../ide/media/vs-2022/show-both-accounts-flyout.png" alt-text="Screenshot showing both accounts on the sign in profile.":::
37
+
38
+
::: moniker-end
28
39
29
-
1. From the **All Accounts** submenu, select the plus sign to add an account, and select**GitHub**.
40
+
**Add a GitHub account from the**Account settings** dialog:**
30
41
42
+
::: moniker range="<=vs-2019"
43
+
44
+
1. Select the icon with your initials in the upper-right corner of the Visual Studio environment. Then, select **Account settings** to manage your accounts. You can also open the Account Settings dialog by going to **File** > **Account Settings...**.
45
+
46
+
:::image type="content" source="../ide/media/vs-2019/account-settings-1.png" alt-text="Screenshot of the Account Settings window.":::
47
+
48
+
1. From the **All Accounts** submenu, select **+Add** to add an account, and select **GitHub**.
1. You'll be redirected to the browser, where you can sign in with your GitHub credentials. After you sign in, you'll get a success window in the browser, and you can return to Visual Studio.
@@ -36,54 +55,129 @@ You can add your public GitHub account if you're already signed into Visual Stud
36
55
37
56
1. You'll have both accounts present in your **All Accounts** submenu.
If you're not already signed in to Visual Studio with a different account, select the **Sign in** link in the upper-right corner of the Visual Studio environment. You can also open the Account Settings dialog by going to **File** > **Account Settings...**. Then, follow the instructions above to add your GitHub account.
60
+
If you're not already signed in to Visual Studio with a different account, select the **Sign in** link in the upper-right corner of the Visual Studio environment. Then, follow the instructions above to add your GitHub account.
42
61
43
-
:::image type="content" source="../ide/media/vs-2022/signin-different-account.png" alt-text="Not signed to VS 2022":::
62
+
:::image type="content" source="../ide/media/vs-2022/signin-different-account.png" alt-text="Screenshot showing not signed in to Visual Studio.":::
44
63
45
-
## Adding GitHub Enterprise Managed User (EMU) accounts
64
+
::: moniker-end
46
65
47
-
You can add your GitHub EMU account if you're already signed into Visual Studio with a Microsoft account, work account, or school account.
66
+
::: moniker range="vs-2022"
48
67
49
-
1. Select the icon with your initials in the upper-right corner of the Visual Studio environment. Then, select **Account settings...** to manage your accounts. You can also open the Account Settings dialog by going to **File** > **Account Settings...**.
68
+
1. Select the icon with your initials in the upper-right corner of the Visual Studio environment. Then, select **Account settings** to manage your accounts. You can also open the Account Settings dialog by going to **File** > **Account Settings...**.
69
+
70
+
:::image type="content" source="../ide/media/vs-2022/account-settings-1.png" alt-text="Screenshot of the Account Settings window.":::
50
71
51
-
:::image type="content" source="../ide/media/vs-2022/account-settings-1.png" alt-text="Screenshot of Enterprise Managed User.":::
72
+
1. From the **All Accounts** submenu, select **+Add** to add an account, and select **GitHub**.
73
+
74
+
:::image type="content" source="../ide/media/vs-2022/sign-in-add-github.png" alt-text="Screenshot showing the Add GitHub account option.":::
52
75
53
-
1.From the **All Accounts** submenu, select the **+** or the **Add** dropdown to add an account, and then select **GitHub**.
76
+
1.You'll be redirected to the browser, where you can sign in with your GitHub credentials. After you sign in, you'll get a success window in the browser, and you can return to Visual Studio.
54
77
55
-
:::image type="content" source="../ide/media/sign-in-add-github.png" alt-text="Screenshot showing how to select and add a GitHub account":::
78
+
:::image type="content" source="../ide/media/github-success-signin.png" alt-text="Success window in browser.":::
56
79
57
-
1. You'll be redirected to the browser, where you can sign in with your GitHub EMU credentials.
80
+
1. You'll have both accounts present in your **All Accounts** submenu.
58
81
59
-
> [!NOTE]
60
-
> Ensure you enter your GitHub EMU account credentials (the username has an underscore followed by the company name) on this page.
82
+
:::image type="content" source="../ide/media/vs-2022/show-both-accounts.png" alt-text="Screenshot showing both accounts on the Account settings dialog.":::
61
83
62
-
:::image type="content" source="../ide/media/github-enterprise-managed-users-sign-in.png" alt-text="Screenshot showing the GitHub sign in experience for the GitHub Enterprise Managed User account":::
84
+
If you're not already signed in to Visual Studio with a different account, select the **Sign in** link in the upper-right corner of the Visual Studio environment. Then, follow the instructions above to add your GitHub account.
63
85
64
-
After you sign in, you'll get a success window in the browser, and you can return to Visual Studio.
86
+
:::image type="content" source="../ide/media/vs-2022/signin-not-signed-in.png" alt-text="Screenshot showing not signed in to Visual Studio.":::
65
87
66
-
:::image type="content" source="../ide/media/github-success-signin.png" alt-text="Screenshot showing the sign-in success window in the browser":::
88
+
::: moniker-end
67
89
68
-
## Adding GitHub enterprise accounts
90
+
## Enabling GitHub enterprise accounts
69
91
70
92
By default, Visual Studio only has public GitHub accounts enabled.
71
93
94
+
::: moniker range="<=vs-2019"
95
+
96
+
1. To enable GitHub enterprise accounts, go to **Tools** > **Options** and search for the **Accounts** options.
97
+
98
+
:::image type="content" source="../ide/media/vs-2022/add-github-enterprise-account.png" alt-text="Screenshot of GitHub Account.":::
99
+
100
+
1. Then, check the box to **Include GitHub Enterprise Server accounts**. The next time you go to your **Account Settings** and try to add a GitHub account, you'll see options for both GitHub and GitHub Enterprise.
101
+
102
+
:::image type="content" source="../ide/media/github-enterprise-endpoint-signin.png" alt-text="Screenshot showing Sign in with GitHub Enterprise.":::
103
+
104
+
1. After you enter your GitHub Enterprise server address, select **Sign in with your browser**. There, you can sign in using your GitHub Enterprise credentials.
105
+
106
+
::: moniker-end
107
+
108
+
::: moniker range="vs-2022"
109
+
72
110
1. To enable GitHub enterprise accounts, go to **Tools** > **Options** and search for the **Accounts** options.
73
111
74
112
:::image type="content" source="../ide/media/vs-2022/add-github-enterprise-account.png" alt-text="Screenshot of GitHub Account.":::
75
113
76
114
1. Then, check the box to **Include GitHub Enterprise Server accounts**. The next time you go to your **Account Settings** and try to add a GitHub account, you'll see options for both GitHub and GitHub Enterprise.
77
115
78
-
:::image type="content" source="../ide/media/github-enterprise-endpoint-signin.png" alt-text="Sign in with GitHub Enterprise":::
116
+
:::image type="content" source="../ide/media/vs-2022/github-enterprise-endpoint-signin.png" alt-text="Screenshot showing the Sign in with GitHub Enterprise.":::
79
117
80
118
1. After you enter your GitHub Enterprise server address, select **Sign in with your browser**. There, you can sign in using your GitHub Enterprise credentials.
81
119
120
+
::: moniker-end
121
+
122
+
## Adding GitHub Enterprise Managed User (EMU) accounts
123
+
124
+
You can add your GitHub EMU account if you're already signed into Visual Studio with a Microsoft account, work account, or school account.
125
+
126
+
::: moniker range="vs-2022"
127
+
128
+
1. Select the icon with your initials in the upper-right corner of the Visual Studio environment. Then, select **Add another account** > **GitHub**.
129
+
130
+
:::image type="content" source="../ide/media/vs-2022/add-another-account-github.png" alt-text="Screenshot of adding Enterprise Managed User.":::
131
+
132
+
1. You'll be redirected to the browser, where you can sign in with your GitHub EMU credentials.
133
+
134
+
::: moniker-end
135
+
136
+
**You can use the Account Settings dialog to manage your accounts:**
137
+
138
+
::: moniker range="<=vs-2019"
139
+
140
+
1. Select the icon with your initials in the upper-right corner of the Visual Studio environment. Open the Account Settings dialog by selecting **Account settings** or by going to **File** > **Account Settings...**.
141
+
142
+
:::image type="content" source="../ide/media/vs-2019/account-settings-1.png" alt-text="Screenshot of the Account Settings window.":::
143
+
144
+
1. From the **All Accounts** submenu, select **+ Add** dropdown to add an account, and then select **GitHub**.
145
+
146
+
:::image type="content" source="../ide/media/sign-in-add-github.png" alt-text="Screenshot showing how to select and add a GitHub account.":::
147
+
148
+
1. Select **GitHub Enterprise** on the **Connect to GitHub** dialog.
149
+
150
+
::: moniker-end
151
+
152
+
::: moniker range="vs-2022"
153
+
154
+
1. Select the icon with your initials in the upper-right corner of the Visual Studio environment. Open the Account Settings dialog by selecting **Account settings** or by going to **File** > **Account Settings...**.
155
+
156
+
:::image type="content" source="../ide/media/vs-2022/account-settings-1.png" alt-text="Screenshot of the Account Settings window.":::
157
+
158
+
1. From the **All Accounts** submenu, select **+ Add** dropdown to add an account, and then select **GitHub**.
159
+
160
+
:::image type="content" source="../ide/media/vs-2022/sign-in-add-github.png" alt-text="Screenshot showing how to select and add a GitHub account.":::
161
+
162
+
1. Select **GitHub Enterprise** on the **Connect to GitHub** dialog.
163
+
164
+
::: moniker-end
165
+
166
+
> [!NOTE]
167
+
> Ensure you enter your GitHub EMU account credentials (the username has an underscore followed by the company name) on this page.
168
+
>
169
+
> :::image type="content" source="../ide/media/github-enterprise-managed-users-sign-in.png" alt-text="Screenshot showing the GitHub sign in experience for the GitHub Enterprise Managed User account.":::
170
+
171
+
After you sign in, you'll get a success window in the browser, and you can return to Visual Studio.
172
+
173
+
:::image type="content" source="../ide/media/github-success-signin.png" alt-text="Screenshot showing the sign-in success window in the browser.":::
174
+
82
175
## Troubleshooting sign in issues
176
+
83
177
If you're experiencing issues when adding or re-authenticating GitHub accounts, try the following steps:
84
178
85
179
Verify that HTTP Strict Transport Security (HSTS) is not enabled for localhost on your system's default web browser:
86
-
- On Micrsoft Edge, you can type: edge://net-internals/#hsts and enter _localhost_ under the **Delete domain security policies** section.
180
+
- On Microsoft Edge, you can type: edge://net-internals/#hsts and enter _localhost_ under the **Delete domain security policies** section.
87
181
- On Google Chrome, type: chrome://net-internals/#hsts and enter _localhost_ under the **Delete domain security policies** section.
0 commit comments