UserProfileService - Cannot Retrieve User Profile - InfoPath Dev
in

InfoPath Dev

UserProfileService - Cannot Retrieve User Profile

Last post 11-06-2016 08:21 PM by leecarver. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 10-29-2016 02:47 PM

    • leecarver
    • Not Ranked
      Male
    • Joined on 06-16-2015
    • Houston, TX
    • Posts 6

    UserProfileService - Cannot Retrieve User Profile

    Hi All,

    I'm encountering an error with an InfoPath form looking up the WorkEmail of a user via the GetUserProfileByName service. Using the People Picker, a user finds a user they want to look up. By pressing a Query button, the system sets the Query Field (AccountName) for the service to the AccountId field of the People Picker. I then Query the service and extract the WorkEmail value for the user ID. This seems to work fine for me and people in my immediate group (my colleagues and manager). But when I try and run it for anyone outside my group, I get the following error:

    The query cannot be run for the following DataObject: GetUserProfileByName
    InfoPath cannot run the specified query.
    The SOAP response indicates that an error occurred:

    A user with the account name i:0#.w|halamerica\hbar448 could not be found. ---> An error was encountered while retrieving the user profile.
    UserCannotBeFoundAn error was encountered while retrieving the user profile.


    Is the service somehow limited to accessing this information only to one's group? It seems strange this would work for people in my immediate group, but not outside it.
  • 10-31-2016 04:31 PM In reply to

    Re: UserProfileService - Cannot Retrieve User Profile

    Here is what I would do - just for some testing - put the query field and data fields on the form and a button that executes the query. Then you can experiment with setting the account id and clicking the button to run it, to see if there are any errors. I'm wondering if you need to use substring-after the "|" character for the account id....
    Hilary Stoupa

  • 11-06-2016 08:21 PM In reply to

    • leecarver
    • Not Ranked
      Male
    • Joined on 06-16-2015
    • Houston, TX
    • Posts 6

    Re: UserProfileService - Cannot Retrieve User Profile

    Thanks for the reply Hilary. It ended up being that the URL I was given did not contain all the lookup data and I was under the mistaken impression that the GetUserByName could only be called from that URL. After doing some digging on other websites, I reset the URL to my own Sharepoint site and everything worked as intended.
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.