I could not connect to Exchange Online, I get the below error while connecting
Error Acquiring Token: System.Exception: In the case of a Federated user(that is owned by a federated IdP, as opposed to a managed user owned in an Azure AD tenant) ID3242: The security token could not be authenticated or authorized.The user does not exist or has entered the wrong pas swordInnerException : Federated service
PowerShell Code
$AppCredential= New-Object System.Management.Automation.PSCredential(<UPN>,<Token>)
Connect-ExchangeOnline -Credential $AppCredential
Reference
Connect to Exchange Online using App-only authentication Feature is not available in EXO V2.
Delegation is not possible with app-only authentication. The Secure App Model allows for unattended scripting in delegation scenarios.
Delegation is not supported in this Feature.
Refer here