Exercise - Retrieve user profile information with the Microsoft Graph SDK
In this exercise, you create a .NET app to authenticate with Microsoft Entra ID and request an access token, then call the Microsoft Graph API to retrieve and display your user profile information. You learn how to configure permissions and interact with Microsoft Graph from your application.
Tasks performed in this exercise:
- Register an application with the Microsoft identity platform
- Create a .NET console application that implements interactive authentication, and uses the GraphServiceClient class to retrieve user profile information.
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/.
Visual Studio Code on one of the supported platforms.
.NET 8 or greater.
C# Dev Kit for Visual Studio Code.
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
