Sunday, 21 February 2016

A call to SSPI failed, AX-BizTalk WCF service

Recently we developed integration between AX and an external system through BizTalk. The data flow from BizTalk to AX was using a WCF service. Everything worked fine in dev/test/uat systems. Once the code was deployed to production system and configured to talk to BizTalk we started getting the following error.

A call to SSPI failed, see inner exception. ---> System.ComponentModel.Win32Exception: The target principal name is incorrect

On investigation we found that User Principal Name (UPN) was not setup properly on the BizTalk Send port. The UPN is usually the AD user under which AX service is running (in an email format e.g. axServiceUser@companydomain.com). It can also be viewed from the service WSDL URI. Find the service from the inbound ports and copy the WSDL URI.


Paste the URI in internet explorer and WSDL will be shown. Scroll to the end and UPN is shown (highlighted below).


Copy this value and paste it in the "Endpoint Identity" in the Send port of BizTalk application as shown below


The error message should disappear.

Note: There may be other causes (Kerberos/Double hop issues) of this error message. In our cause this was the only issue.

This posting is provided "AS IS" with no warranties. Use code at your own risk.

No comments:

Post a Comment