This sample uses the OAuth 2.0 authorization code grant with confidential client and the Active Directory Authentication Library (ADAL) to obtain access tokens for the web app to call the Graph API with the user's identity.
Let’s have a look how this can be done with applications targeting the cross-platform . Fortunately, the dotnet team is working really hard on closing gaps and to bring a lot of functionality back into the BCLs (base class libraries, System.*).
One common question when writing console or web apps is, what is the directory the app is running in. Runtime Framework; When writing applications, the requirement to make it configurable usually comes up pretty quickly.
Depending on the type of the application and which API is used, asking for the application's base directory can return different results. Application Version; // object with some dotnet runtime version information var runtime Framework = Platform Services. It might need environment specific switches, logger settings or connection strings for example.
This sample will not work with a Microsoft account, so if you signed in to the Azure portal with a Microsoft account and have never created a user account in your directory before, you need to do that now.
From your shell or command line: Clean the solution, rebuild the solution, and run it.