Skip to content

Commit 0d2c22b

Browse files
authored
Merge pull request #79121 from jmprieur/fixDeviceCodeFlow
fix registration for DeviceCodeFlow
2 parents e670ea7 + b2c4ed0 commit 0d2c22b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

articles/active-directory/develop/scenario-desktop-app-configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ IPublicClientApplication app = PublicClientApplicationBuilder.Create(clientId)
4242
.Build();
4343
```
4444

45-
If you intend to use interactive authentication, as seen above, you want to use the `.WithRedirectUri` modifier:
45+
If you intend to use interactive authentication or Device Code Flow, as seen above, you want to use the `.WithRedirectUri` modifier:
4646

4747
```CSharp
4848
IPublicClientApplication app;

articles/active-directory/develop/scenario-desktop-app-registration.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,13 @@ If your desktop application uses interactive authentication, you can sign in us
4343

4444
Again the redirect URIs to use in desktop application will depend on the flow you want to use.
4545

46-
- If you're using the interactive authentication, you'll want to use `https://login.microsoftonline.com/common/oauth2/nativeclient`. You'll achieve this configuration by clicking the corresponding URL in the **Authentication** section for your application
46+
- If you're using the **interactive authentication** or **Device Code Flow**, you'll want to use `https://login.microsoftonline.com/common/oauth2/nativeclient`. You'll achieve this configuration by clicking the corresponding URL in the **Authentication** section for your application
4747

4848
> [!IMPORTANT]
4949
> Today MSAL.NET uses another Redirect URI by default in desktop applications running on Windows (`urn:ietf:wg:oauth:2.0:oob`). In the future we'll want to change this default, and therefore we recommend that you use `https://login.microsoftonline.com/common/oauth2/nativeclient`
5050
51-
- If your app is only using Integrated Windows authentication, Username/Password or Device Code Flow, you don't need to register a redirect URI for your application. Indeed, these flows do a round trip to the Microsoft identity platform v2.0 endpoint and your application won't be called back on any specific URI. In order to distinguish them from a confidential client application flow, which doesn't have redirect URIs either (the client credential flow used in daemon applications), you need to express that your application is a public client application. This configuration is achieved by going to the **Authentication** section for your application, and in the **Advanced settings** subsection, choose **Yes**, to the question **Treat application as a public client** (in the **Default client type** paragraph)
51+
- If your app is only using Integrated Windows authentication, Username/Password, you don't need to register a redirect URI for your application. Indeed, these flows do a round trip to the Microsoft identity platform v2.0 endpoint and your application won't be called back on any specific URI.
52+
- In order to distinguish Device Code Flow, Integrated Windows Authentication and Username/Password from a confidential client application flow, which doesn't have redirect URIs either (the client credential flow used in daemon applications), you need to express that your application is a public client application. This configuration is achieved by going to the **Authentication** section for your application, and in the **Advanced settings** subsection, choose **Yes**, to the question **Treat application as a public client** (in the **Default client type** paragraph)
5253

5354
![Allow public client](media/scenarios/default-client-type.png)
5455

0 commit comments

Comments
 (0)