Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Exception while requesting auth security token from Dynamics CRM 2016 online

Posted on by 35

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

  • Suggested answer
    Luke Sartain Profile Picture
    Luke Sartain 1,266 on at
    RE: Exception while requesting auth security token from Dynamics CRM 2016 online

    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.  

  • RE: Exception while requesting auth security token from Dynamics CRM 2016 online

    Hi,

    I've the same issue, somebody has a solution?

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,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans