Invokes a feature that SharePoint exposes as a web service action, such as the Document Workspace getdwsdata action.


Extensibility tags, MS Office Integration tags.


action="webservice action" 
params="parameter structure" 
domain="domain name" 
name ="result variable name" 
password="connection password" 
userName="user ID" 
wsdl="WSDL file path"> 

action="webservice action" 
params="parameter structure" 
login = "credentials structure" 
name ="result variable name" 
wsdl="WSDL file path">

With NTLM attributes

action="webservice action"
params="parameter structure"
domain="domain name"
ntlmdomain="domain where user is registered"
workstation="workstation name"
name="result variable name"
password="connection password"
username="user ID"
wsdl="WSDL file path">


When the login attribute is used, then the NTLM attributes must go into the login struct. For example,

loginStruct = {domain="myDomain", username="userName", password="pa$$w0rd",authtype="ntlm", ntlmdomain="myNTLMDomain"};
cfsharepoint(action="getlistcollection", login=loginStruct, name="myResult");


You can specify this tag's attributes in an attributeCollection attribute whose value is a structure. Specify the structure name in the attributeCollection attribute and use the tag's attribute names as structure keys.


Adobe ColdFusion (2016 release): Added the authType, ntlmDomain, and workstation attributes.

ColdFusion 9: Added tag.


Attribute Req/Opt Default Description
action Required   The name of a web service action. See Usage for the list of service actions you can specify.
authType Optional   The authentication type to use. You can use NTLM or BASIC.
domain Optional   The domain name required to connect to the SharePoint server. Required if you do not specify a login attribute.
login Optional   A structure containing user, password, and domain login credentials to pass to the service. If you do not specify domain, password, and userName attributes, specify a login structure with domain, password, and userName entries.
name Optional   Name of the result variable in which to put the data returned by the SharePoint service.
ntlmDomain If authType=NTLM, ntlmDomain is required.  

Domain in which a user is registered.

Note: When a user is part of a domain, the ntlmDomain attribute is mandatory. When a user is not part of a domain, the ntlmDomain attribute is not mandatory.

params Optional   A structure containing names and values of the parameters to pass to the service.
This attribute is required for any service that requires parameters.
password Optional   The password required to connect to the SharePoint server. Required if you do not specify a login attribute.
userName Optional   The user name required to connect to the SharePoint server. Required if you do not specify a login attribute.
wsdl Optional   Path to the service wsdl file. Required to invoke an action that is not in the list of supported actions. See Usage for details.
workstation Optional   Host name of the client machine.


The cfsharepoint tag invokes a Microsoft SharePoint web service. You call many SharePoint web service actions by specifying the action name in the action attribute and passing the web service parameters in the params attribute. You access the services and methods that the cfsharepoint tag does not support directly by specifying the service WSDL URLs in the wsdl attribute.

You request a service and action by specifying the action attribute values listed in the following tables. In nearly all cases, these are identical to the SharePoint action names. Notes indicate where the attribute values differ from the action names because multiple services have the same action name.


The web service action parameters are documented at You can also determine the parameters from the web service WSDL, at http://server_name/_vti_bin/WebServiceName?wsdl.


For some SharePoint operations, the WSDL contains out parameters. In the cfsharepoint tag, the input and output parameters are passed in the param attribute, which is a struct containing key value pairs of input and output parameters.

The SharePoint web service response for individual out parameters will be populated in the struct passed as the cfsharepoint param attribute. It will not be available as part of the result attribute of the tag.

When the cfsharepoint tag receives the results from the SharePoint server and completes, the structure specified by the name attribute contains the response. This structure also has a ResultFlag entry containing the value Success or Failure. The entry value is Success if there is no Axis Fault or an error is returned in the response, otherwise, the value is Failure.

Document Workspace

cancreatedwsurl deletedwsfolder renamedws
createdws finddwsdoc updatedwsdata
createdwsfolder getdwsdata  
deletedws removedwsuser  


The createdwsfolder and deletedwsfolder action attribute values correspond to the createfolder and deletefolder actions of the Document Workspace service.


delete getitemsbyids upload
download listpicturelibrary  
getimaginglistitems rename  


The getimaginglistitems action attribute value correspond to the getlistitems action of the Imaging service.


addattachment getattachmentcollection updatelist
addlist getlist updatelistitems
deleteattachment getlistcollection  
deletelist getlistitems  

Search or spsearch

spsearch/search is not present in Windows SharePoint Services 2.0.

In Windows SharePoint Services 3.0, if the action attribute specifies any of the following actions, the spsearch.asmx web service is used to perform the search. In Microsoft Office SharePoint Portal Server 2003 or Microsoft Office SharePoint Server 2007, search.asmx is used to perform the search. In Windows Sharepoint Services 2.0, an exception is thrown.

query registration
queryex status


addgrouptorole getgroupcollection removerole
addrole getrolecollection removeusercollectionfromgroup
addusercollectiontogroup getusercollectionfromrole removeuserfromgroup
addusercollectiontorole getusercollectionfromrole  
addusertogroup getuserinfo  


addview getview updateview
deleteview getviewcollection  

Data type conversion

Some web service actions require parameters in a Microsoft data type that does not correspond directly to a ColdFusion data type. The cfsharepoint tag automatically converts between the Microsoft data types and the most appropriate Java data types, which ColdFusion uses internally. The following table lists the conversions, and indicates the corresponding ColdFusion data type.

SharePoint data type ColdFusion Java data type
XmlNode XMLNodeList - corresponds to a ColdFusion XML object, for example created by passing an XML string to the XmlParse function.)
ArrayOfString string array - corresponds to a ColdFusion array containing string data.
UnsignedInt int - corresponds to a ColdFusion number that is an integer value
ArrayOfUnsignedInt int array - corresponds to a ColdFusion array containing string data.


The following example shows how you can manipulate lists and views. It requires resources on the SharePoint server that are not specified here.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 
<title>cfsharepoint Views Example</title> 


Getting the list collection<br /> 
<!--- All login information is defined using variables in the Application.cfc file. ---> 
<cfsharepoint action="getlistcollection" login="#login#" name="result"/> 

result.ResultFlag: #result.ResultFlag#<br><br> 

Deleting mycustomlist from the collection, if it exists.<br> 
<cfloop array=#result.lists# index="list"> 
<cfif list.Title EQ "mycustomlist"> 
<cfsharepoint action="deletelist" login="#login#" 
name="result1" params="#{listname="mycustomlist"}#"/> 

Was anything deleted? 
<cfif IsDefined("result1")> 
<b>YES.</b> The result is:</b><br> 
<cfdump var="#result1#"><br> 

Adding a mycustomlist list<br /> 
<cfsharepoint action="addlist" login="#login#" name="result1" 
description="Adding a list via cfsharepoint", 

addlist result.ResultFlag: #result1.ResultFlag#<br><br> 

<cfset viewFields = xmlparse("<ViewFields> 
<FieldRef Name='Title'/> 
<FieldRef Name='ID'/> 

<cfset query = xmlparse("<Query> 
<FieldRef Name='ID'/> 
<Value Type='Counter'>10</Value> 
<FieldRef Name='ID'/> 

<cfset rowlimit = xmlparse("<RowLimit Paged='True'>50</RowLimit>")> 

Adding a myview1 view for the mycustomlist list<br /> 
<cfsharepoint action="addview" login="#login#" name="result" 
viewFields="#viewFields#", query="#query#",rowlimit="#rowlimit#", 

addview result.ResultFlag: #result.ResultFlag#<br><br> 

Adding a myview3 view for the mycustomlist list<br /> 
<cfsharepoint action="addview" login="#login#" name="result" params="#{listName="mycustomlist",viewname="myview3",viewFields="#viewFields#", 

addview result.ResultFlag: #result.ResultFlag#<br><br> 

Getting the updated mycustomlist view collection<br> 
<cfsharepoint action="getviewcollection" login="#login#" name="result" 

<b>getviewcollection result</b><br> 
<cfdump var="#result#"><br /> 

The names of the collection's views:<br> 
<cfloop array=#result.views# index=v> 

Deleting the list<br> 
<cfsharepoint action="deletelist" login="#login#" name="result1" params="#{listname="mycustomlist"}#"/> 

deletelist result.ResultFlag: #result1.ResultFlag#