cfsharepoint and Sharepoint Online error
I am trying to access a Sharepoint Online list from ColdFusion using the below codes:
<cfset viewFields = xmlParse(" <ViewFields> <FieldRef Name='Title'/> <FieldRef Name='Model'/></ViewFields> ")> <cfset query = xmlParse(" <Query> <OrderBy> <FieldRef Name='Title'/> </OrderBy> </Query> ")> <cfset queryOptions = xmlParse("<QueryOptions></QueryOptions>")> <cfsharepoint action="getlistitems" domain="Domain Name" name="spVar" userName="UserName" password="Password" params="#{listName="1F8473F8-7969-49F9-936D-89B8FA95DDE", viewName="818CC7AA-9B0A-4D46-A8FB-4A6C872EE064", query="#query#", rowLimit="20", viewFields="#viewFields#", queryOptions="#queryOptions#", webID="" }#" /> <cfset results="#spVar.listitems.data#"> <h1>Site Punch List</h1> <ul> <cfloop index="i" from="1" to="#arrayLen(results)#"> <li><cfoutput>#results[i].ows_Title#</cfoutput></li> </cfloop> </ul> </td> </tr>
Using the above code, I tried to use Cold Fusion to access a list on our Sharepoint Online site.
However, when I run the above code, I got the below error
"Error","ajp-nio-8016-exec-8","10/17/19","10:12:32","INTRANET","Cannot perform web service invocation getlistitems.The fault returned when invoking the web service operation is:<br> <pre>AxisFault faultCode: {http://xml.apache.org/axis/}HTTP faultSubcode: faultString: (403)Forbidden faultActor: faultNode: faultDetail: {}:return code: 403 403 FORBIDDEN {http://xml.apache.org/axis/}HttpErrorCode:403 ''</pre> The specific sequence of files included or processed is: #My file name# line: 179 "
Any idea? The error looks like username/password error, but I use the same username/password to login to the Domain Name.
Thanks!
dc7669
