Exercise - Implement interactive authentication with MSAL.NET
In this exercise, you register an application in Microsoft Entra ID, then create a .NET console application that uses MSAL.NET to perform interactive authentication and acquire an access token for Microsoft Graph. You learn how to configure authentication scopes, handle user consent, and see how tokens are cached for subsequent runs.
Tasks performed in this exercise:
- Register an application with the Microsoft identity platform
- Create a .NET console app that implements the PublicClientApplicationBuilder class to configure authentication.
- Acquire a token interactively using the user.read Microsoft Graph permission.
This exercise takes approximately 15 minutes to complete.
Before you start
To complete the exercise, you need:
- An Azure subscription. If you don't already have one, you can sign up for one https://azure.microsoft.com/.
Get started
Select the Launch Exercise button to open the exercise instructions in a new browser window. When you're finished with the exercise, return here to:
- Complete the module
- Earn a badge for completing this module
