Skip to main content

Hi All,

My Sharepoint 2010 environment is built on ABC domain. We have 2 way trusts with another domain e.g. XYZ. I'm able to add people from XYZ domain to sites and they are able to access my environment.

When i try to use webservice UserGroup.asmx to resolve their display names from account ID, it throws exception. The Query WebService in the 2010 workflow is able to resolve the Name for ABCUserName but when I query for XYZUserName, it throws exception.

Failed to invoke web service. Error returned from server: <soap:Fault

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>soap:Server</faultcode><faultstring>Exception

of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.

In ULS logs it shows this:

<detail><errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap/">User cannot be found.</errorstring>

How can I resolve this issue? Does it mean that web service cannot resolve users from different domain? Any help is appreciated.

Cannot you use the query user profile action?


No, cannot. I dont have Enterprise version. happy.png


Hi Dave,

Yes, other forests have been configured to synch with my SP env. All users from other domains have MySites.


Hey Kapil,

I've had a similar issue in the past before when I built an InfoPath 2010 Form that was calling the UserGroup.asmx web service. I ended up using UserProfileService.asmx webservice instead due to how MySites worked on SharePoint 2010.

I think you might find this post here on MSDN here informative.


Hi Palesa Sikwane ,
Thanks for providing this link.

When I use UserProfileSerive.asmx, I get a big XML. How can I get the Preferred Name out of this XML format.

         <PropertyData>

          <IsPrivacyChanged>false</IsPrivacyChanged>

          <IsValueChanged>false</IsValueChanged>

          <Name>PreferredName</Name>

          <Privacy>Public</Privacy>

          <Values>

            <ValueData>

              <Value xsi:type="xsd:string">Joshi, Kapil</Value>

            </ValueData>

          </Values>

        </PropertyData>

I tried some XSLT and XPATH but could not get the value. I tried this in XPATH:

/GetUserProfileByNameResponse/GetUserProfileByNameResult/PropertyData/Values/ValueData/ValueP@Name = "PreferredName"]


Cool beans,

 

So how about we manipulate the XML result you got to get it in the format we'd like it in?

 

 

1) Looking at your sample XML it looks like the Query XML Nintex action breaks when trying to get the value because of this portion xsi:type="xsd:string".Removing this portion makes it easier for us to do an Xpath Query using the Query XML Action.

2) The value in your inner XML for the value seems to be in the format LastName, FirstName so we might have to Put is as FirstName LastName.

 

So based you your sample XML result from your previous post I built the following test workflow below to potentially solve your issue:

 

Nintex Community Josh Kapil.png

 

 

And got the following results (values I logged in my history list:

 

Nintex Community Josh Kapil History List.png

 

 

This worked on my end. Give it a try . I feel there might be a way to simplify it, but for now this does the job. I've uploaded the Exported List Workflow i did above for you here

 

Let me know if it helps


Thanks a lot Palesa Sikwane .

This was extremely helpful and well explained. (my firstname is Kapil and last name is Joshi wink.png


LOL oops! Sorry about that haha!!! Glad I could help tho happy.png


Thanks Dave happy.png


Reply