The user isn't assigned to any management roles
Error executing PowerShell command 'Connect-ExchangeOnline'. The user "userid" isn't assigned to any management roles.
This can occur when the service principal has not been configured correctly in Exchange Online and has not been assigned any management roles.
Follow the steps in the Service Principal (Certificate) section.