0
votes

We have a 2011/R18 CRM On Prem running on a windows server 2008R2. A different group internally are trying to call the SOAP Organization endpoint. They are getting HTTP 401 errors. After a LOT of web browsing, I'm now wondering if, for some reason that I don't quite understand, we need our CRM server to be running on server 2012 R2? I say this because of this article. The article is for CRM 2013 on but can someone explain why windows server 2012R2 is required?

Relevant piece of article is:

Technology dependencies

The following technology is required to develop and execute external client applications that authenticate with the Microsoft Dynamics CRM OData and SOAP web service endpoints:

Claims configuration is required for on-premises deployment.

AD FS on Windows Server 2012 R2.

Our setup is the crm 2011 app server is separate to the crm db server. For the web service calls we have a dedicated user that has crm sysadmin rights

Our problem is a web service/authentication issue. I am used to making web service calls in C# apps using a username/pwd but we are having tremendous difficulty making explicit SOAP over HTTPS calls with the same username/pwd combo. I should mention our setup uses integrated security i.e. if I logon to our domain, bring up a browser and go to crm, I don't have to login i.e. it uses the credentials I used to login to the machine.

I am using SOAPUI 5.0.0 as the client. Below are the details of the SOAPUI setup. I am able to successfully execute the request in wcfTestClient.exe (although I'm not sure why) but cannot get the same request to work in SOAPUI.

The Request (note: with the valid value, i should get 1 result from the fetch)

<s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
  <s:Header>
    <a:Action s:mustUnderstand="1">http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/RetrieveMultiple</a:Action>
    <a:MessageID>urn:uuid:1fa4d6ce-6dcc-470e-af92-7be3b79990cf</a:MessageID>
    <a:ReplyTo>
      <a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
    </a:ReplyTo>
  </s:Header>
  <s:Body>
    <RetrieveMultiple xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services">
      <query xmlns:d4p1="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" i:type="d4p1:FetchExpression">
        <d4p1:Query>&lt;?xml version="1.0"?&gt;&lt;fetch distinct="false" mapping="logical" output-format="xml-platform" version="1.0"&gt;&lt;entity name="contact"&gt;&lt;attribute name="contactid"/&gt;&lt;filter type="and"&gt; &lt;condition attribute="telephone1" value="<**a valid value here>**" operator="eq"/&gt; &lt;/filter&gt;&lt;/entity&gt;&lt;/fetch&gt;</d4p1:Query>
      </query>
    </RetrieveMultiple>
  </s:Body>
</s:Envelope>

The Response

HTTP/1.1 401 Unauthorized
Cache-Control: private
Transfer-Encoding: chunked
Content-Type: text/plain
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
WWW-Authenticate: NTLM
WWW-Authenticate: Negotiate
X-Powered-By: ASP.NET
Date: Thu, 08 Jan 2015 03:59:11 GMT

HTTP Error 401 - Unauthorized: Access is denied

SOAP Request Properties

SOAP Request Auth Details

SOAP Request Headers

1
Can you please give more details by posting the code which you are using to pass the credentials and authenticate with CRM?Mani
@CRM Updated question with more info. Let me know if I need to supply more?keerz

1 Answers

0
votes

It is not required to run the CRM on windows server 2012 R2 for the CRM 2011/R18.

Your problem should be on the authenticating the user on CRM when calling the web service. Is the application hosted on the same server as CRM? If not, can you access CRM from the custom application server? Witch user is requesting the access?

Please check the above points in order to determine if the problem is in CRM or your custom application.