Hello,
We are using ASP.NET Web API to for connecting to Dynamics CRM 2016 online and generating the token once user is authenticated. The Web API is using Organization service to connect, authenticate and request token from the server and. We have got a new Sandbox instance where facing the problem to get the token. We are getting the below error while calling orgServiceMgmt.Authenticate(clientCredentials) -
"Message": "An error has occurred.",
"ExceptionMessage": "An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.",
"ExceptionType": "System.ServiceModel.Security.MessageSecurityException",
"StackTrace": "\r\nServer stack trace: \r\n at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.ProcessReply(Message reply, SecurityProtocolCorrelationState correlationState, TimeSpan timeout)\r\n at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.Request(Message message, TimeSpan timeout)\r\n at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)\r\n at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)\r\n at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)\r\n at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)\r\n\r\nException rethrown at [0]: \r\n at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)\r\n at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)\r\n at Microsoft.IdentityModel.Protocols.WSTrust.IWSTrustContract.Issue(Message message)\r\n at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.Issue(RequestSecurityToken rst, RequestSecurityTokenResponse& rstr)\r\n at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.Issue(AuthenticationCredentials authenticationCredentials)\r\n at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.AuthenticateTokenWithACSForCrm(AuthenticationCredentials authenticationCredentials, Uri appliesTo, Uri acsEndpoint)\r\n at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.AuthenticateOnlineFederationInternal(AuthenticationCredentials authenticationCredentials)\r\n at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.Authenticate(AuthenticationCredentials authenticationCredentials)\r\n at Microsoft.Xrm.Sdk.Client.OrganizationServiceConfiguration.Authenticate(AuthenticationCredentials authenticationCredentials)\r\n atSystem.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()",
"InnerException": {
"Message": "An error has occurred.",
"ExceptionMessage": "ACS10002: An error occurred while processing the SOAP body. ACS50000: There was an error issuing a token. ACS50001: Relying party with identifier 'ABC.crm.dynamics.com' was not found.\nTrace ID: 11530-6b-f36-80-7ca0796e\nTimestamp: 2016-11-14 07:02:33Z",
"ExceptionType": "System.ServiceModel.FaultException",
"StackTrace": null
Kindly note that we are using the same code with other CRM 2016 onlilne instances and there is no issue. We also checked separately by calling the WhoAmI service and its sucessfull hence the user is being authenticated by the server but the token is not issued.
*This post is locked for comments
I had a similar problem. Would connect to some of our instances but not others, despite all being the same version of 2016. I updated the Microsoft.Xrm.Sdk.dll reference from version 7.0.0.0 to 8.1.0.383 which resolved the problem. May be worth a try.
Hi,
I've the same issue, somebody has a solution?
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,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156