Accessing data within Microsoft 365
In your SPFx solutions, you will likely manipulate data coming from different sources within the Microsoft 365 platform (SharePoint, Teams, and so on) and it is important to know what APIs you can use and how to access them.
Microsoft 365 is a platform that groups many tools under the same roof and, as a result, provides a unified API to interact with them: the Microsoft Graph API. This is the recommended API for accessing data within a Microsoft 365 tenant. However, because the platform also groups tools originally coming from the on-premises world, such as SharePoint, it also contains dedicated and legacy APIs that you can still use as well. In the context of SPFx, we will focus on the SharePoint REST APs and Microsoft Graph as they are the two main APIs you will commonly have to use when building solutions.
Note
As long as you need to get data from Microsoft 365 workloads using APIs, identity and authentication will be involved. They...