Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

The request for security token could not be satisfied because authentication failed.

Posted on by 230

Hi,

Were using a WIndows service which establishes a WCF connection to CRM. It worked well in 2015, but i cant get it to work in 2016 (performed an in-place upgrade). Nothing else was changed other than the upgrade. Something tells me that its the AppPool credentials/identity of the WCF site that may need to be adjusted. I tried an Admin AD user (which has permissions to CRM), and NetworkService. No luck. The AppPool for the CRM site itself (CRMAppPool) is running as NetworkService (Classic).

It throws the following error:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ServiceModel.Security.SecurityNegotiationException: The caller was not authenticated by the service. ---> System.ServiceModel.FaultException: The request for security token could not be satisfied because authentication failed.

 

Below is a copy of the web.config:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appSettings />
<system.web>
<compilation debug="true" targetFramework="4.0" />
<httpRuntime maxRequestLength="102400" executionTimeout="3600" />
</system.web>
<system.serviceModel>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true">
</serviceHostingEnvironment>
<bindings>
<basicHttpBinding>
<binding name="basicHttpBindingConfiguration">
<security mode="Transport">
<transport clientCredentialType="None" proxyCredentialType="None"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="MobiTrans.WcfService.MobiTransWCFService">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicHttpBindingConfiguration" contract="MobiTrans.WcfService.IMobiTransWCFService"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information,
set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="True" httpsGetEnabled="True" />
<!-- To receive exception details in faults for debugging purposes,
set the value below to true. Set to false before deployment
to avoid disclosing exception information -->
<serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>

<!--
To browse web app root directory during debugging, set the value below to true.
Set to false before deployment to avoid disclosing web app folder information.
-->
<directoryBrowse enabled="false" />
</system.webServer>
</configuration>

*This post is locked for comments

  • JoeO Profile Picture
    JoeO 230 on at
    RE: The request for security token could not be satisfied because authentication failed.

    Update:

    Strangely, if i run the CRM site AppPool as a domain user (Active Directory user with Administrative permissions to CRM), im seemingly able to start the service without any errors. IIRC, the CRMAppPool should not run as a user but as NetworkService. Can someone explain why this is happening and the correct steps to resolve?

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!

Community AMA December 12th

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

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 229,993 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans