Unable to Login to Dynamics CRMOrganizationServiceProxy is nullOrganizationServiceProxy is null OrganizationServiceProxy is null
Took Over a Month to Figure It Out: Unable to Connect to CRM After Upgrade. The Reason is that SecurityProtocolType.Tls12 Must Be Provided Before Calling XRM Underlying Code. This is due to Changes to the .NET Framework and the Fact that XRM Tooling somehow uses telemetry.
Using XRM Tooling to Connect to Dynamics CRM 365 - Online, Once You Upgrade From Earlier (Pre 8.x), You Will Get This Error
Error Title:
Unable to Login to Dynamics CRMOrganizationServiceProxy is nullOrganizationServiceProxy is null OrganizationServiceProxy is null
Root Cause:
(TLS 1.2 is NOT negotiated in .NET 4.7 without explicit ServicePointManager.SecurityProtocol call)
I Found the Fix to Be As Follows (Thanks to Microsoft Brightest Mrs. - Swarnavalli Microsoft 365 Development Team):
LastCrmError = "Unable to Login to Dynamics CRMOrganizationServiceProxy is nullOrganizationServiceProxy is null OrganizationServiceProxy is null"

1. Fix Step 1 - Get Nuget Packages for Verion 9.0 of the Dynamics CRM From This Location
www.nuget.org/.../Microsoft.CrmSdk.XrmTooling.CoreAss
embly/
Install the Nuget Package(PM > Install-Package Microsoft.CrmSdk.XrmTooling.CoreAssembly -Version 9.0.0.7)
2. Fix Step 2 - Clean Up All Your Visual Studio Development Not to Use Older Versions of CRM SDK (Use .NET Framework 4.6x or 4.7). Add required XRM Dlls Back for Newest Version - V9 for Me Now)
3. Fix Step 3 - Specify Protocol Right Before You Make Calls TO XRM Tooling DLL. Add a Line to Your C# or Dot Net Code.
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
Add (ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;) Somewhere in your Project. As Proof of Concept, Add It Before You Call the Connect to CRM Constructor
m_CrmServiceClient = new CrmServiceClient(LoginUserName, CrmServiceClient.MakeSecureString(LoginPassword), OrganizationRegionName, OrganizationName, useUniqueInstance, useSsl, orgDetail, isOffice365);
This Has Taken Near 1 Month to Figure It Out. With Many Many Calls to Microsoft (Thanks Largely to Microsoft Brightest Mrs. - Swarnavalli Microsoft 365 Development Team)
Bashar Sadig