Did you assign an admin role to the service principal? Step 5 here: https://learn.microsoft.com/en-us/powershell/exchange/app-only-auth-powershell-v2?view=exchange-ps#step-5-assign-microsoft-entra-roles-to-the-application
This is a mandatory step, you cannot skip it. If you do not want to assign a "wide" Entra ID role, you can use the Exchange RBAC model instead, read here: https://learn.microsoft.com/en-us/exchange/permissions-exo/application-rbac