There Was An Error Parsing WS-Trust Response From The Endpoint. This May Occur If There Is An Issue With The ADFS Configuration [Microsoft Office 365]

How to fix "There was an error parsing WS-Trust response from the endpoint"?

Issue Description: When using Integrated Windows Authentication (IWA) from Office 365 Scope, the following error is thrown when trying to authenticate

Full Error In Text:

Message: An error occurred sending the request.

 ---> RemoteException wrapping Microsoft.Identity.Client.MsalClientException: There was an error parsing WS-Trust response from the endpoint. This may occur if there is an issue with your ADFS configuration. See https://aka.ms/msal-net-iwa-troubleshooting for more details.

Root Cause: This can happen due to the following reasons

  1. Azure App Registration has Public Client Flow Disabled
  2. Other Federation service than Active Directory Federation Services (ADFS) is being used
  3. ADFS is only partially configured

Resolution:

  1. Azure App Registration has Public Client Flow Disabled

Go to Azure -> App Registrations ->