Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Unable to login to dynamics CRM

Posted on by Microsoft Employee

I got the following exception when trying to connect to Dynamics CRM using connection string as belows

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

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

Exceptions:

Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : ERROR REQUESTING ORG
S FROM THE DISCOVERY SERVER
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : Source      : mscorl
ib
Method  : HandleReturnMessage
Date    : 6/8/2017
Time    : 4:29:17 PM
Error   : Access is denied.
Stack Trace     : Server stack trace:
   at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message
 reply, MessageFault fault, String action, MessageVersion version, FaultConverte
r faultConverter)
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRunt
ime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean on
eway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan tim
eout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCall
Message methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage req
Msg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgDa
ta, Int32 type)
   at Microsoft.Xrm.Sdk.Discovery.IDiscoveryService.Execute(DiscoveryRequest req
uest)
   at Microsoft.Xrm.Sdk.Client.DiscoveryServiceProxy.Execute(DiscoveryRequest re
quest)
   at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.DiscoverOrganizations(Uri discov
eryServiceUri, Uri homeRealmUri, ClientCredentials clientCredentials, ClientCred
entials deviceCredentials)
================================================================================
======================================

Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : No Orgs Found, Searc
hed Online. Region Setting = IND
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : Unable to Login to D
ynamics CRM
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : OrganizationServiceP
roxy is null
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : OrganizationWebProxy
Client is null

*This post is locked for comments

  • Github Profile Picture
    Github 5 on at
    RE: Unable to login to dynamics CRM

    Changing versions of these packages may work.

    pastedimage1662171961764v1.png

  • Suggested answer
    Nishant Rana Profile Picture
    Nishant Rana 55 Microsoft Employee on at
    RE: Unable to login to dynamics CRM

    This worked for us

    nishantrana.me/.../

  • Suggested answer
    Vipin J Profile Picture
    Vipin J 1,583 on at
    RE: Unable to login to dynamics CRM

    I resolved this error using useUniqueInstance: false

    Refer here: https://vjcity.blogspot.com/2020/05/error-requesting-orgs-from-discovery.html

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Unable to login to dynamics CRM

    I got the same error when converting to Dynamics 365 (on premise), but I was still able to connect.  I followed this example provided by Microsoft:

    https://msdn.microsoft.com/en-us/library/jj602970.aspx

    I changed this line from

    // Cast the proxy client to the IOrganizationService interface.

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

    to this

    _orgService = (IOrganizationService)conn.OrganizationServiceProxy;

    and the error went away. Apparently I do not have a OrganizationWebProxyClient in my environment.


  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Unable to login to dynamics CRM

    Hi Avinash, No unfortunately I've had to park this to one side as it's a personal project I'm working on. If you manage to find an answer please let us know. I suspect this is a bug with the current tools and the latest version.

  • Shahbaaz Ansari Profile Picture
    Shahbaaz Ansari 6,203 on at
    RE: Unable to login to dynamics CRM

    Hi Bhavik,

    I think there is a problem with the India Tenant that is "crm8". i was also facing this problem when i was trying to add dll into plugin registration tool,

    please check below link

    community.dynamics.com/.../263160

    Thanks,

    Shahbaaz

  • Avinash Lanka Profile Picture
    Avinash Lanka 15 on at
    RE: Unable to login to dynamics CRM

    Hi Guy,

    I am facing the same problem (after build 9.0.0.3172) with my trial version from last week. 

    I am not able to connect to CRM via Plugin registration tool or LoginControlTester.

    However I can connect to organization via Microsoft.CrmDeveloperTools.

    Recently I received main from Microsoft stating below

    "Starting on January 04, 2018, 2:12 AM UTC, we detected a problem with Dynamics 365. Your users might not be able to sign in right now or they might have trouble using some features."

    Were you able to find a way through?

    Regards,

    Avinash.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Unable to login to dynamics CRM

    Thanks for you response however I don't believe this is the problem I do have framework 4.6.2 installed.

    I'm attempting to connect with the dynamics LoginControlTester.exe tool unsuccefully to this one trail version of Dynamics 9.0 uk crm11

    The error I get is: "ERROR REQUESTING Token FROM THE Authentication context"

    It discovers the one organization see partial log below:

    Microsoft.Xrm.Tooling.Connector.CrmServiceClient Information: 8 : Found 1 Org(s)

    Microsoft.Xrm.Tooling.Connector.CrmServiceClient Verbose: 16 : DiscoveryServer indicated organization service location = xxxx.api.crm11.dynamics.com/.../Organization.svc

    Microsoft.Xrm.Tooling.Connector.CrmServiceClient Information: 8 : Organization Service URI is = xxxxx.api.crm11.dynamics.com/.../Organization.svc

    ConnectAndInitCrmOrgService - Initializing Organization Service Object

    ConnectAndInitCrmOrgService - Requesting connection to Org with CRM Version: 9.0.0.3172

    Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : ERROR REQUESTING Token FROM THE Authentication context

    Thanks anyway

    Guy

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Unable to login to dynamics CRM

    hi,

    Right now Microsoft update new MSCRM365 version released last December2017

    Many third party tool did not connected like CRM,XRMToolBox,

    If you update Versions is Manadatory

    Like 4.5.2 didnot supported latest version  give 4.6.2 it 's work

    and install  .Netframework4.6.2 package

    I hope it will work fine

    you will refer also below link

    www.microsoft.com/.../net471;utm_medium=referral

    Thanks

    venkateswarlu

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Unable to login to dynamics CRM

    Sorry this was intended for @Caffreybcc. I also have the same problem with a uk (crm11) trial instance.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans