Exercise 3: Implementing Authentication with the MSAL
This exercise will guide you through creating a basic console app that implements authentication using the MSAL, rather than easy authentication, which you’ve been using so far.
Task 1: Creating a New Console App and Adding the MSAL.NET Package
Follow these steps to create a top-level C# console app that uses MSAL.NET
, keeping things relatively simple:
- Within ME-ID, create a new app registration that will represent your console app. Give it any name you’d like, leave it as a single tenant app, then, under Redirect URI (optional), change the Select a platform dropdown to Public client/native (mobile & desktop). Set the URI to
http: //localhost
, then click Register.Because our app will be a console app running on our device, that makes it a public app, hence selecting this option. Also, remember that the redirect URI is where the browser will send any tokens, which should be the
localhost
when the app...