0

I'm trying to integrate ColdFusion version 2016 application with SharePoint. I have a ColdFusion app that is trying to access a csv file on a SharePoint site. I'm able to access the csv file on SharePoint when I pass in the URL into a browser, but unable to access it from CF. I tried several different combinations of the tag but keep getting one of the following errors:

1) '401 UNAUTHORIZED'
2) Error: org.apache.http.conn.HttpHostConnectException: Connect to 
   DomainName:80

(Note: In the second error, I masked the actual domain name for security purposes).

I confirmed with the SharePoint admin that the domain name, username and password are set up correctly and he did confirm the same. Has anyone tried this type of integration and run into the same issues, and how was it solved?

Code for a couple of the combinations of cfsharepoint that I tried is below:

Using cfscript:

<cfscript>

    loginStruct = {domain="xxxxx", username="abc123", password="xyz$566",authtype="ntlm", wsdl="https://mywebsite.com/sites/xxx-Home/_vti_bin/Lists.asmx?wsdl"};

    cfsharepoint(action="getlistcollection", login=loginStruct, name="myResult");

    writeDump(myResult);
    //writeDump(loginStruct);
</cfscript>

Using :

<cfsharepoint action="getlistcollection"  
        WSDL="https://mywebsite.com/sites/xxx-Home/LED_Docs/Forms/AllItems.aspx?WSDL"
        username="abc123"
        domain="xxxx"
        password="xyz$566"
        name="listCollection"/>
        authtype="NTLM"
        <CFDUMP var="#listCollection#">
Roger Dodger
  • 927
  • 2
  • 16
  • 37
  • 1
    Can you browse to your WSDL link? – Shawn Oct 01 '18 at 15:21
  • 1
    And is the certificate for the HTTPS stored in your Java keystore? – Shawn Oct 01 '18 at 15:26
  • @Shawn - yes, I can browse to the link and view the file. I don't know if there is a cert in the java keystore since the CF server is hosted and I don't have access to it. – Roger Dodger Oct 01 '18 at 21:55
  • 1
    Is the `/>` a typo in your `Using:` example? You're closing the tag before specifying NTLM authentication. Move the tag closing to after your `authtype` argument. – Shawn Oct 02 '18 at 14:03
  • 1
    Ah.... note from Adobe: https://helpx.adobe.com/coldfusion/using/ntlm-support.html `When the login attribute is used, then the NTLM attributes must go into the login struct. For example, loginStruct = {domain="myDomain", username="user name", password="pa$$w0rd", authtype="ntlm", ntlmdomain="myNTLMDomain"};`. Does that change work? Also, https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-tags/tags-r-s/cfsharepoint.html – Shawn Oct 02 '18 at 14:07
  • @Shawn - yes I believe I've tried that - if you look at my OP, the first method I tried using cfscript has ntlm in it; I did have ntlmdomain as well but removed it at some point - can ntlmdomain have any arbitrary name? Where is the ntlmdomain name found? – Roger Dodger Oct 02 '18 at 14:24
  • 1
    You have `domain`, but for NTLM Auth, you also need to include an `ntlmdomain` attribute. – Shawn Oct 02 '18 at 14:42
  • 1
    It would be the name of the directory your users are authenticating against. Are you using Active Directory? – Shawn Oct 02 '18 at 14:51
  • Shawn - yes, the SharePoint admin notified that they're using AD for authentication - and all the credentials are fine; how would I get the ntlm domain name? Would that be something that the Sharepoint admin would know? – Roger Dodger Oct 02 '18 at 19:15
  • 1
    Probably. But I believe it should be the AD group that the user you're using in the `cfsharepoint` tag. I'm not 100% sure of the difference between the two, but I'll look into it. – Shawn Oct 02 '18 at 21:57
  • I given up on cfsharepoint and instead trying a jquery ajax solution. I posted a question about that which is here: https://stackoverflow.com/questions/52645847/performing-ntlm-authentication-in-jquery-ajax-get-call – Roger Dodger Oct 04 '18 at 11:45
  • 1
    Is this Sharepoint server on your internal network? Can you reach the server resources without using HTTPS? – Shawn Oct 04 '18 at 14:22
  • Yes, it's on our internal network, no I can't access it without https. – Roger Dodger Oct 08 '18 at 14:02

0 Answers0