While trying to create a new connection in XrmToolBox, we got the below error
We had used the Connection Wizard as the connection method
After failing a couple of more times, we realised the mistake.
For the user who is trying to log in, MFA is enabled.
So, instead we opted for the SDK Login control connection method.
Clicking Open Sdk Login Control button opens up the standard login control to connect to Dynamics 365.
Provide username, password, and click on login.
Enter the code (received on registered phone number).
Thus, using the SDK Login Control, we were able to connect successfully.
You can also connect by registering the Azure AD App
Check the below article for further details and different ways to connect to Dynamics 365 using XrmToolBox
Hope it helps..