1 min read
Authentication to and querying Microsoft Graph by using MSAL and .NET SDKs Part 3 – Query Microsoft Graph by using the .NET SDK
Add the Graph SDKs and build.
dotnet add package Microsoft.Graph --version 1.21.0
dotnet add package Microsoft.Graph.Auth --version 1.0.0-preview.2
dotnet build
Next update the code as described in the lab.

Finally run the .NET application.
Take note of the validation code. Visit the site and enter it and notice that the Graph API has queried your username from the Azure AD!

Great work today!