Skip to content

Commit 1dc6fb0

Browse files
authored
Update Windows Broker documentation to clarify MSA behaviours (#1362)
When you sign-in with an MSA using WAM you are asked if you wish to use this account "everywhere on your device", or just "Microsoft apps only". The former will connect your local user account to an MSA, and the latter will not. Clarify the docs around this, including an annotated image of the specific dialog. In addition, since GCM 2.1, we are using a newer version of MSAL that uses the new MSAL runtime that solves the COM security issues that presented with elevated processes. Update our documentation to recommend people update to fix this problem. Fixes #1355 Rendered: https://github.com/mjcheetham/git-credential-manager/blob/wam-doc-update/docs/windows-broker.md
2 parents 8c430c9 + cf734ce commit 1dc6fb0

File tree

3 files changed

+44
-15
lines changed

3 files changed

+44
-15
lines changed

docs/img/msa-confirm.png

77.5 KB
Loading

docs/img/msa-remove.png

146 KB
Loading

docs/windows-broker.md

Lines changed: 44 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ your machine: requiring certain kinds of sign-in, turning on antivirus and
8686
firewall software, and enabling BitLocker.
8787
Your identity will also be available to other apps on the computer for signing
8888
in, some of which may do so automatically.
89+
8990
![Example of policies pushed to an Intune-enrolled device][aad-bitlocker]
91+
9092
- If you uncheck "allow my organization to manage my device" and click "OK",
9193
your computer will be registered with Azure AD but will not be MDM-enrolled.
9294
Your identity will be available to other apps on the computer for signing in.
@@ -95,6 +97,7 @@ organization to manage your device. Despite joining Azure AD, your
9597
organization's Conditional Access policies may still prevent you from accessing
9698
Azure DevOps.
9799
If so, you'll be prompted with instructions on how to enroll in MDM.
100+
98101
- If you instead click "No, sign in to this app only", your machine will not be
99102
joined to Azure AD or MDM-enrolled, so no policies can be enforced, and your
100103
identity won't be made available to other apps on the computer.
@@ -132,27 +135,48 @@ improve over time and a "personal account" option to be presented in the future.
132135

133136
If you've connected your MSA to Windows or signed-in to other Microsoft
134137
applications such as Office, then you may see this account listed in the
135-
authentication prompts when using GCM. For any connected MSA, you can control
136-
whether or not the account is available to other Microsoft applications in
137-
**Settings**, **Accounts**, **Emails & accounts**:
138+
authentication prompts when using GCM.
139+
140+
---
141+
142+
⚠️ **Important** ⚠️
143+
144+
When adding a new MSA to Windows, you'll be asked to select whether to use this
145+
account across all of your device (**option 1**), or only permit Microsoft-apps
146+
to access your identity (**option 2**). If you opt to use the account everywhere,
147+
then your local Windows user account will be connected to that MSA.
148+
This means you'll need to use your MSA credentials to sign in to Windows going
149+
forward.
150+
151+
Selecting "just this app" or "Microsoft apps only" will still allow you to use
152+
this MSA across apps in Windows, but will not require you to use your MSA
153+
credentials to sign in to Windows.
154+
155+
![Confirmation to connect your MSA to Windows][msa-confirm]
156+
157+
To disconnect an MSA added using option 1, you can go into **Settings**,
158+
**Accounts**, **Your info** and click **Stop signing in to all Microsoft apps
159+
automatically**.
160+
161+
![Remove your Microsoft account from Windows][msa-remove]
162+
163+
For MSAs added for "Microsoft apps only", you can modify whether or not these
164+
accounts are available to other applications, and also remove the accounts from
165+
**Settings**, **Accounts**, **Emails & accounts**:
138166

139167
![Allow all Microsoft apps to access your identity][all-ms-apps]
140168

141169
![Microsoft apps must ask to access your identity][apps-must-ask]
142170

143-
Two very important things to note:
171+
## Running as administrator
144172

145-
- If you haven't connected any Microsoft accounts to Windows before, the first
146-
account you connect will cause the local Windows user account to be converted to
147-
a connected account.
148-
- In addition, you can't change the usage preference for the first Microsoft
149-
account connected to Windows: all Microsoft apps will be able to sign you in
150-
with that account.
173+
### GCM 2.1 and later
151174

152-
As far as we can tell, there are no workarounds for either of these behaviors
153-
(other than to not use the WAM broker).
175+
From version 2.1 onwards, GCM uses a version of the [Microsoft Authentication
176+
Library (MSAL)][msal-dotnet] that supports use of the Windows
177+
broker from an elevated process.
154178

155-
## Running as administrator
179+
### Previous versions
156180

157181
The Windows broker ("WAM") makes heavy use of [COM][ms-com], a remote procedure
158182
call (RPC) technology built into Windows. In order to integrate with WAM, Git
@@ -181,8 +205,10 @@ See https://aka.ms/gcm/wamadmin for more information.
181205

182206
In order to fix the problem, there are a few options:
183207

184-
1. Run Git or Git Credential Manager from non-elevated processes.
185-
2. Disable the broker by setting the
208+
1. Update to the [latest Git for Windows][git-for-windows-latest]
209+
**(recommended)**.
210+
2. Run Git or Git Credential Manager from non-elevated processes.
211+
3. Disable the broker by setting the
186212
[`GCM_MSAUTH_USEBROKER`][GCM_MSAUTH_USEBROKER]
187213
environment variable or the
188214
[`credential.msauthUseBroker`][credential.msauthUseBroker]
@@ -204,5 +230,8 @@ In order to fix the problem, there are a few options:
204230
[all-ms-apps]: img/all-microsoft.png
205231
[apps-must-ask]: img/apps-must-ask.png
206232
[ms-com]: https://docs.microsoft.com/en-us/windows/win32/com/the-component-object-model
233+
[msa-confirm]: img/msa-confirm.png
234+
[msa-remove]: img/msa-remove.png
207235
[msal-dotnet]: https://aka.ms/msal-net
208236
[devbox]: https://azure.microsoft.com/en-us/products/dev-box
237+
[git-for-windows-latest]: https://git-scm.com/download/win

0 commit comments

Comments
 (0)