积极答复者
How Can i get the user profile detail in Infopath forms in SharePont online.

问题
-
Hi All,
I am working on InfoPath UserProfileService for retrieving user details on the form using GetUserProfileByName.udcx data connection.
But as I observed UserProfileService do not support in SharePoint online(Office 365). Is there any workaround for the same?
Goal: Get logged in user details on InfoPath form on form load event
Background: SharePoint Migration from 2010 to SharePoint online
I have tried following workarounds
- Used SharePoint internal list i.e., User Information List, but it did not help in retrieving the data plus it do not contain all the details like for example, ‘manager details’
- Inserted on premise URL(SharePoint 2013) in GetUserProfileByName.udcx and fetched data from on premise UserProfileService but still do not succeed
- Used URL https://siteadmin.sharepoint.com/_vti_bin/userprofileservice.asmx in GetUserProfileByname.udcx which locates admin site for SharePoint online.
I have tried using REST API but it's show error
A query to retrieve form data cannot be completed because this action would violate cross-domain restrictions.
And used AppId in udcx which was created in secure store on SharePoint admin site(for online)
Eventually attempts did not solve the error. If anyone can share workaround, the help would be appreciated.
Regards,
Deepak Chauhan
SharePoint 2010 & 2013 and Office-365 Branding and Front End Customization, UI Design
2016年7月4日 11:21
答案
-
Hi Deepak,
In Office 365, loopback protection is enabled which must be disabled for InfoPath forms to be able to connect to some SharePoint Online web services.
For security reasons, loopback protection is always enabled in SharePoint Online. This is a known limitation of InfoPath forms in the Office 365 SharePoint Online environment.
So, you are not able to get user information via web service in InfoPath form.
As a workaround, you can set the column available as a library column, and create a SharePoint 2010 workflow to run on ItemCreation, then use the workflow to pull user information from User Profiles.
More information, you can refer to:
Another workaround, you can involve SharePoint Client Object model and Query string(URL) filter web part to do it.
More information:
http://kitmenke.com/blog/2013/10/31/pass-user-information-from-sharepoint-2013-to-infopath-2013/
Thanks,
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.- 已建议为答案 Victoria Xia 2016年7月15日 8:11
- 已标记为答案 Victoria Xia 2016年7月27日 9:21
2016年7月5日 6:36
全部回复
-
Hi Deepak,
Did you went through these approaches mentioned below?
KRISHANA KUMAR
SharePoint Architect
Please click "Mark As Answer" if this post solves your problem or "Vote As Helpful" if it was useful
2016年7月4日 17:37 -
Hi Deepak,
In Office 365, loopback protection is enabled which must be disabled for InfoPath forms to be able to connect to some SharePoint Online web services.
For security reasons, loopback protection is always enabled in SharePoint Online. This is a known limitation of InfoPath forms in the Office 365 SharePoint Online environment.
So, you are not able to get user information via web service in InfoPath form.
As a workaround, you can set the column available as a library column, and create a SharePoint 2010 workflow to run on ItemCreation, then use the workflow to pull user information from User Profiles.
More information, you can refer to:
Another workaround, you can involve SharePoint Client Object model and Query string(URL) filter web part to do it.
More information:
http://kitmenke.com/blog/2013/10/31/pass-user-information-from-sharepoint-2013-to-infopath-2013/
Thanks,
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.- 已建议为答案 Victoria Xia 2016年7月15日 8:11
- 已标记为答案 Victoria Xia 2016年7月27日 9:21
2016年7月5日 6:36 -
There is a Video out by Laura Rogers that shows you how to convert your data connection to a connection file and then make changes in Admin Center. Check it out.
https://wonderlaura.com/2012/06/27/infopath-pre-populate-the-people-picker/ I don't have access to the Admin center so I could not go all the way with this.
Marie
2020年8月4日 20:09