I am developing an InfoPath 2010 template with compatibility for InfoPath 2007 and published to a SharePoint Server 2010 form library as a thick client template (cf. browser based). The template also runs code behind (VB), so is fully trusted and signed with a certificate. The problem I am facing is trying to determine the SharePoint user who opened the form. There are business scenarios where the Windows user and SharePoint user will be different, so I need to know who the SharePoint user is, regardless of who the Windows user is. Based on a number of tests that I have run, I have concluded the following:
1. The InfoPath client based form template always displays the Windows account as the Created By user, regardless of who is logged in to SharePoint.
2. The InfoPath browser based form template always displays the SharePoint account as the Created By user, regardless of who is logged in to Windows.
These results were obtained by using the UserGroup.asmx SharePoint web service. I should also mention that development is being done on a 32-bit version of Windows Server 2003, using 32-bit InfoPath 2010. Apparently, this means that making API calls to SharePoint 2010's "Microsoft.SharePoint.dll" assembly is not possible because the server and InfoPath both need to be 64-bit and development needs to be done on a SharePoint 2010 web server. Please correct me if this is inaccurate.
Is it possible to get the SharePoint 2010 user context for an InfoPath client based template?
Thanks!