To connect to SharePoint, the Microsoft Graph API is used. Register an app in Microsoft Entra ID and configure the Microsoft Graph permissions.
The way you set up the app in Microsoft Entra ID, depends on how you want to access SharePoint. You can access SharePoint with:
Client credentials: Get access without a user.
Username and password: Get access on behalf of a user.
For more information, refer to: