I want to sign in users to their Microsoft account (Work or school account or Outlook.com accounts). I've managed to do this through example code. However, for my project I want to store the access token for later access. The problem is that I don't know where I can find the access token in the code. I have basic knowledge of OAUTH and using GET and POST commands, but no expert in ASP.NET, Razor or the libraries that handles the authentication or sign in process.
I've created a project as follows, which contained example code to sign in users:
Create new project - ASP.NET Core Web Application - Web Application (Model-View-Controller).
Choose .NET Core 2.2.
Authentication - click "change".
Choose "Work or school accounts". Information: For applications that authenticate users with Active Directory, Microsoft Azure Active Directory, or Office 365.
Enter domain name of my Microsoft Azure Active Directory tenant.
Running this application, it will ask me to log in and to consent that the application can get access to my account. It works as intended.
But is there any place in the code where I can debug and have a look at the access token? I can't even locate the POST command in the project code, which I assume is called behind the scenes to get hold of it.