Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

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

(0) ShareShare
ReportReport
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!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans