Scenario/Problem: You need to enable the use of the InfoPath Form Services web service proxy.
Solution: Use the Set-SPInfoPathWebServiceProxy
cmdlet.
The InfoPath Form Services web services proxy can be used to access web services without passing the credentials of the form user. A set of credentials for the web service needs to be stored within SharePoint’s Secure Store Service (SSS), which is the replacement for Single Sign-On (SSO).
You need to modify a data connection file that your InfoPath form is using as a web service connection by adding a UseFormsServiceProxy
attribute with a setting of true
(see Listing 12.7), along with an Authentication
element that references the Secure Store application ID (see Listing 12.8).
<udc:ServiceUrl UseFormsServiceProxy="true"/>
<udc:Authentication>
<udc:SSO AppId="<<AppID>>" CredentialType="<<credential type>>"/>
</udc:Authentication>
The possible credential types are as follows:
• Basic
• CD
• Digest
• Kerberos
• NTLM
• SQL
To enable the use of the web proxy, use the following cmdlet:
Set-SPInfoPathWebServiceProxy -Identity "<<URL of web application>>"
-AllowWebServiceProxy $true
To enable SharePoint forms to use the web proxy, use the following cmdlet:
Set-SPInfoPathWebServiceProxy -Identity "<<URL of web application>>"
-AllowForUserForms $true
Tip
The AllowWebServiceProxy
setting needs to be set to true
first before AllowForUserForms
can be set to true
. This is why the cmdlets need to be separated.
18.217.109.151