none
infopath - newbie question (get data from AD)

Answers

All replies

  • Hi,

    your URL may be wrong.

    Please check once again. or try the following options

    http://sharepoint.stackexchange.com/questions/72385/infopath-and-active-directory

    http://www.infopathdev.com/forums/p/4913/18910.aspx

    https://msdn.microsoft.com/en-us/library/bb952744%28v=office.12%29.aspx?f=255&MSPPError=-2147217396


    Please remember to click Mark as Answer on the answer if it helps you

    Tuesday, January 10, 2017 11:14 PM
  • Hi,

    According to the video you provided, you need to install DBXL third-party product:

    http://www.qdabra.com/en/products/ADWebService.aspx

    SharePoint have user profile service to fetch data from AD. I suggest you get data from SharePoint user profile service in InfoPath form:

    http://eimagine.com/using-infopath-and-the-web-service-getuserprofilebyname/

    Thanks,

    Dean Wang


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, January 11, 2017 8:27 AM
    Moderator
  • Dean thanks.

    I have figured that by now, that I have option of third party product and user profile service.
    Till now I have partly managed to establish soap connection with user profile service, and on InfoPath form locally if I run preview it shows ok, the data is being sucessfully shown and pulled from userprofile service, but as soon as I publish this form to SharePoint and open it there I got an error message sth regardin data connection etc. etc.
    This error message dissappears if I delete the SOAP connection, so it has sth to do with it.
    I have followed this instructions:

    https://blogs.technet.microsoft.com/anneste/2011/11/02/how-to-create-an-infopath-form-to-auto-populate-data-in-sharepoint-2010/

    I did not create a custom list, maybe there could be a root of the problem, that you must choose content types etc.


    bostjanc

    Wednesday, January 11, 2017 8:30 AM
  • This is the errror visible on SharePoint Event Viewer's side:

    The following query failed: GetUserProfileByName (User: 0#.w|mydomain\myusername, Form Name: Mesecni potni nalog FORM LIBRARY, IP: , Connection Target: , Request: http://sharepoint/_layouts/15/FormServer.aspx?XsnLocation=http://sharepoint/Prototip/Mesecni potni nalog FORM LIBRARY/Forms/template.xsn&SaveLocation=http://sharepoint/Prototip/Mesecni potni nalog FORM LIBRARY&ClientInstalled=true&DefaultItemOpen=1&Source=http://sharepoint/Prototip/SitePages/Home.aspx, Form ID: urn:schemas-microsoft-com:office:infopath:Mesecni-potni-nalog-FORM-LIBRARY:-myXSD-2017-01-11T09-54-08 Type: DataAdapterException, Exception Message: The remote server returned an error: (500) Internal Server Error.
    Server was unable to process request. ---> Attempted to perform an unauthorized operation.
    The remote server returned an error: (500) Internal Server Error.)

    Previewing InfoPath form locally Works ok, but when its published to SharePoint and opening it there, makes the upper error.
    Any hints why is that?

    With best regards


    bostjanc

    Wednesday, January 11, 2017 10:40 AM
  • It must be regarding claims based auth per error message on server?

    If we follow the instructions on: https://youtu.be/onpMrRwF2Fg?t=1m2s

    Now InfoPath throws an error when we wish to preview it:

    The query cannot be run

    for the following DataObject: GetUserProfileByName
    InfoPath cannot run the specified query.
    The data connection file could not be accessed.
    The form contains XML that cannot be parsed:
    End tag 'udc:Authentication--' does not match the start tag 'udc:Authentication'.

    Line 26, Position 84
      <udc:Authentication><udc:SSO AppId="InfoPathSecureApp" CredentialType="NTLM" /></udc:Authentication-->
    -----------------------------------------------------------------------------------^

    Is it really necessary to play with udcx files, and store service for form to collect ad from server side?


    bostjanc


    Wednesday, January 11, 2017 11:07 AM
  • Ok the error was that I forgot to delete some -- at the end:

    WRONG:

     <udc:Authentication><udc:SSO AppId="InfoPathSecureApp" CredentialType="NTLM" /></udc:Authentication-->

    CORRECT:

     <udc:Authentication><udc:SSO AppId="InfoPathSecureApp" CredentialType="NTLM" /></udc:Authentication>

    Now I have a newer/different error on SharePoint server.

    The following query failed: GetUserProfileByName (User: 0#.w|mydomain\myusername, Form Name: Mesecni potni nalog FORM LIBRARY, IP: , Connection Target: http://sharepoint/Prototip/Mesecni potni nalogi Data Connection Library/GetUserProfileByName.udcx, Request: http://sharepoint/_layouts/15/FormServer.aspx?XsnLocation=http://sharepoint/Prototip/Mesecni potni nalog FORM LIBRARY/Forms/template.xsn&SaveLocation=http://sharepoint/Prototip/Mesecni potni nalog FORM LIBRARY&ClientInstalled=true&DefaultItemOpen=1&Source=http://sharepoint/Prototip/Mesecni%2520potni%2520nalog%2520FORM%2520LIBRARY/Forms/AllItems.aspx, Form ID: urn:schemas-microsoft-com:office:infopath:Mesecni-potni-nalog-FORM-LIBRARY:-myXSD-2017-01-11T09-54-08 Type: DataAdapterException, Exception Message: Authentication information in the UDC file could not be used for this connection because user forms are not allowed to use UDC authentication. To change this settings, use the InfoPath Forms Services configuration page in SharePoint Central Admin.)

    I'm trying to find out where this settings are stored/hidden on central admin site: To change this settings, use the InfoPath Forms Services configuration page in SharePoint Central Admin.)


    bostjanc

    Wednesday, January 11, 2017 11:18 AM
  • Found the settings, they are hidden: Central admin / General APP settings / InfoPath Forms Services

    I have marked the checkbox: Allow user form templates to use authentication information contained in data connection files
    But wait a moment, another error after doing that... It's like a neverending story OMG !

    The following query failed: GetUserProfileByName (User: 0#.w|mydomain\myusername, Form Name: Mesecni potni nalog FORM LIBRARY, IP: , Connection Target: http://sharepoint/Prototip/Mesecni potni nalogi Data Connection Library/GetUserProfileByName.udcx, Request: http://sharepoint/_layouts/15/FormServer.aspx?XsnLocation=http://sharepoint/Prototip/Mesecni potni nalog FORM LIBRARY/Forms/template.xsn&OpenIn=browser&SaveLocation=http://sharepoint/Prototip/Mesecni potni nalog FORM LIBRARY&Source=http://sharepoint/Prototip/Mesecni potni nalog FORM LIBRARY, Form ID: urn:schemas-microsoft-com:office:infopath:Mesecni-potni-nalog-FORM-LIBRARY:-myXSD-2017-01-11T09-54-08 Type: DataAdapterException, Exception Message: SSO returns an error: Credentials were not found for the current user within the target application 'InfoPathSecureApp'. Please set the credentials for the current user..
    Credentials were not found for the current user within the target application 'InfoPathSecureApp'. Please set the credentials for the current user.)

    What's wrong now?
    Every user should be able to create a new form.

    please help how to solve this:

    I have followed all the instructions from:

    https://www.youtube.com/watch?v=onpMrRwF2Fg

    Some printscreens bellow:


    bostjanc


    Wednesday, January 11, 2017 11:35 AM
  • Basically I have followed all the steps from:
    https://spvee.wordpress.com/2013/04/10/auto-populate-user-information-in-infopath-with-claims-based-authentication-part-1-of-3/

    https://spvee.wordpress.com/2013/04/10/auto-populate-user-information-in-infopath-with-claims-based-authentication-part-2-of-3/

    https://spvee.wordpress.com/2013/04/10/auto-populate-user-information-in-infopath-with-claims-based-authentication-part-3-of-3/

    Now, when I already thought this is it, nope it isn't.
    Currently FORM opens normally thru SharePoint, but now it does not fills any date inside the form (the data that should be captured from userprofile). :(


    bostjanc

    Wednesday, January 11, 2017 3:13 PM
  • Anyone please?

    with best regard


    bostjanc

    Wednesday, January 11, 2017 7:49 PM
  • It was my fault.

    After setting fields right per this YouTube video: https://youtu.be/onpMrRwF2Fg?t=3m39s

    the InfoPath form in browser is being filled in with data.

    with best regards


    bostjanc

    Wednesday, January 11, 2017 10:00 PM
  • Hi,

    Thanks for your detailed updating :)

    Thanks,

    Dean Wang


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Thursday, January 12, 2017 11:05 AM
    Moderator