Service principal sign-in data from Azure AD is now accessible through a Microsoft Graph API. This means that you can analyze sign-in data to locate problem apps and remove old or unwanted service principals from your Microsoft 365 tenant. It’s time for spring cleaning!
https://office365itpros.com/2022/02/03/service-principal-sign-in-data-detect-problem-apps/