There were different errors I got based on the method used to connect to CRM
Error message: OrganizationServiceProxy is null
LastCrmError: "Unable to Login to CRM OrganizationServiceProxy is null"
For Web service OrganizationService
Error: Metadata contains a reference that cannot be resolved: ‘https://***.api.crm4.dynamics.com/XRMServices/2011/Organization.svc?wsdl&sdkversion=9
During my search for a resolve, which took me days, I stumbled upon this blog
Following this link by Microsoft New features of Dynamics 365 Customer Engagement. It explained the possible ways to resolve it.
Adding this piece of code before authentication resolves the issue
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12