web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

CRM Online | General ADAL Error

(0) ShareShare
ReportReport
Posted on by 10

We are migration our CRM 2016 from onprem to CRM Online using Fast Track from Microsoft.

One of our services in one of our production server had the following problem, when trying to connect to Microsoft.Xrm.Tooling.Connector.CrmService:

One or more errors occurred. => An error occurred while sending the request. => The underlying connection was closed: An unexpected error occurred on a send. => Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. => An existing connection was forcibly closed by the remote hostERROR REQUESTING Token FROM THE Authentication context - General ADAL Error
One or more errors occurred. => An error occurred while sending the request. => The underlying connection was closed: An unexpected error occurred on a send. => Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. => An existing connection was forcibly closed by the remote hostOne or more errors occurred. => An error occurred while sending the request. => The underlying connection was closed: An unexpected error occurred on a send. => Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. => An existing connection was forcibly closed by the remote hostUnable to connect to CRM: An error occurred while sending the request.
One or more errors occurred. => An error occurred while sending the request. => The underlying connection was closed: An unexpected error occurred on a send. => Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. => An existing connection was forcibly closed by the remote hostUnable to Login to Dynamics CRM
Unable to Login to Dynamics CRMOrganizationWebProxyClient is null
OrganizationWebProxyClient is null

We didn't got this problem in development machines environment, not in testing machines environment.

Has anyone got this erro before?

Thanks.

I have the same question (0)
  • Suggested answer
    Guido Preite Profile Picture
    54,086 Moderator on at

    probably has to do with the package version and the authentication.

    Update to the latest SDK and use an authentication method like clientid/clientsecret (office365 authentication with username/password is not supported)

  • Suggested answer
    omvf_m Profile Picture
    10 on at

    Hi, after openning a case with Microsoft support we found the problem.

    We were getting this error on the production machine becausa it was using TLS 1.0, the problem was resoulve when we force the usage of TLS 1.2 (yellow part):

    var connectionString = "authtype=ClientSecret;url=example.crm4.dynamics.com/;clientid=<guid>;ClientSecret=<secret>";

    ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

    CrmServiceClient conn = new Microsoft.Xrm.Tooling.Connector.CrmServiceClient(connectionString);

    var service = (IOrganizationService)conn.OrganizationWebProxyClient != null ? (IOrganizationService)conn.OrganizationWebProxyClient : (IOrganizationService)conn.OrganizationServiceProxy;

    if (service == null)
    {
        Console.WriteLine($"Error getting IOrganizationService-{conn?.LastCrmError}");
        throw new Exception("Error getting IOrganizationService.");
    }

    More info:

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 108 Super User 2025 Season 2

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans