If you are using multi-factor authentication, it is not possible to use the old method of connecting to Exchange Online. You will have to install the Exchange Online Remote PowerShell Module, and use the Connect-EXOPSSession cmdlet to connect.
You can install the PowerShell module by following these instructions:
Log on to Exchange admin center.
In the left menu, click on hybrid.
Click the configure button for the Exchange Online Remote PowerShell Module. This will start the installation.
In the Application Install that appears, click the Install button.
A shortcut will be placed on your desktop which will start PowerShell with the required modules.