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
Changing versions of these packages may work.
I resolved this error using useUniqueInstance: false
Refer here: https://vjcity.blogspot.com/2020/05/error-requesting-orgs-from-discovery.html
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.
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.
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
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.
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
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
Sorry this was intended for @Caffreybcc. I also have the same problem with a uk (crm11) trial instance.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156