Authenticating to Microsoft 365 APIs with a certificate — step-by-step
This blog post is meant to be the one place to get all of the information you need for setting up certificate authentication. This scenario is important when you, for example, want to use the SharePoint Online REST API with application permissions.