Hi, @Andrea Thiel
Based on your description, this looks like you're getting an error when connecting to Exchange Online PowerShell using the interactive interface.
Here are some suggestions you can follow:
1.Make sure you have installed the Exchange Online management module:
Install-Module -Name ExchangeOnlineManagement
2.Use the following command to log in:
Connect-ExchangeOnline -UserPrincipalName user@example.com -ShowProgress $true
More information can be found Connect to Exchange Online PowerShell | Microsoft Learn
3.How did you get the token? See microsoft graph api - Could not login using access token from powershell - Stack Overflow
4.If your organisation uses federation and your identity provider (IDP) and/or Security Token Service (STS) aren't publicly available, you can't use a federated account to connect to Exchange Online PowerShell.
5.Make sure your root certificate is the latest certificate from a trusted authority. If you're using a self-signed certificate or a certificate from an internal CA, you need to trust that CA. You can import CA certificates into a trusted root certificate store.
6.Enable TLS 1.2.
7.Log in with a different administrator account to see if the problem persists.
If an error occurs in the above steps, you can also attach a screenshot.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".