Building a web application that uses the Microsoft Graph API
In the previous sections of this chapter, we covered the features and capabilities of the Graph API. In this section, we are going to use the Graph API SDK to retrieve data from Microsoft 365.
This is the second part of this demonstration. We covered the first part in the previous chapter, where we focused on sign-in functionality using OAuth 2.0, OpenID Connect, and MSAL. In this second and last part, we are going to cover how to retrieve data from the Graph API using the credentials of a signed-in user.
If you need to set this application up from scratch, you can refer to Chapter 5, Securing Applications with OAuth 2.0, OpenID Connect, and MSAL. In the following diagram, you can see the scenario that we are going to build in this demo:
In this chapter, we are going to focus on the bottom part of the preceding diagram, where we connect to the Graph API...