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: msal-dotnet-articles/acquiring-tokens/desktop-mobile/linux-dotnet-sdk.md
+28-44Lines changed: 28 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,33 @@ An authentication broker is an application that runs on a user’s machine that
29
29
-**System integration.** Applications that use the broker plug-and-play with the built-in account picker, allowing the user to quickly pick an existing account instead of reentering the same credentials over and over.
30
30
-**Token Protection.** Microsoft single sign-on for Linux ensures that the refresh tokens are device bound and [enables apps](../../advanced/proof-of-possession-tokens.md) to acquire device bound access tokens. See [Token Protection](/azure/active-directory/conditional-access/concept-token-protection).
31
31
32
-
## Prerequisites
32
+
## User sign-in experience
33
+
34
+
This video demonstrates the sign-in experience on brokered flows on Linux
35
+
36
+

37
+
38
+
## How to opt in to use broker?
39
+
40
+
### Update Application Definition
41
+
42
+
In the MSAL Python library, we've introduced the `enable_broker_on_linux` flag, which enables the broker on both WSL and standalone Linux.
43
+
- If your goal is to enable broker support solely on WSL for Azure CLI, you can consider modifying the Azure CLI app code to activate the `enable_broker_on_wsl` flag exclusively on WSL.
44
+
- If you are writing a cross-platform application, you'll also need to use `enable_broker_on_windows`, as outlined in the [Using MSAL Python with Web Account Manager](wam.md) article.
45
+
- You can set any combination of the following opt-in parameters to true:
46
+
47
+
| Opt-in flag | If app runs on | App has registered this as a Desktop platform redirect URI in Azure portal |
To use the broker, apps must provide the window handle to which the modal dialog be parented using `libx11` library. The window handle must be provided by the developer because it's infeasible for MSAL itself to infer the parent window. In the past, lack of handling parent window leads to bad user experiences where the authentication window was hidden behind the application window.
72
98
73
-
For console applications, you can use code like the snippet below.
74
-
75
-
Here’s sample code to use `libx11`:
99
+
For console applications, here’s sample code to use `libx11`:
76
100
77
101
```csharp
78
102
usingSystem;
@@ -107,40 +131,6 @@ To set up a test app, you can either create your own console app as shown below,
107
131
108
132
To use a broker on the Linux platform, set the `BrokerOptions` to `OperatingSystems.Linux` as shown in the below code snippet:
A sample application is available in the [MSAL.NET GitHub repository](https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/tree/main/tests/devapps/WAM/NetWSLWam).
145
135
146
136
```csharp
@@ -257,12 +247,6 @@ To run the sample app:
257
247
dotnet run --project tests/devapps/WAM/NetWSLWam/test.csproj
258
248
```
259
249
260
-
## Demo of user Login
261
-
262
-
This video demonstrates the sign-in experience on brokered flows on Linux
263
-
264
-

265
-
266
250
## Username/password flow
267
251
268
252
This flow, also known as Resource Owner Password Credentials (ROPC), isn't recommended except in test scenarios or in scenarios where service principal access to a resource gives it too much access and you can only scope it down with user flows. When using the broker, [`AcquireTokenByUsernamePassword`](xref:Microsoft.Identity.Client.PublicClientApplication.AcquireTokenByUsernamePassword*) lets the broker manage the protocol and fetch tokens.
0 commit comments