views:

18

answers:

1

Hi all,

I am having a problem with getting the right userinfo from the usergroup.asmx webservice. I am sending the username to the webservice and I get the userinfo as a response. In the response I see that the userid = 87 and username = john smith.

Than I call the updatelistitems webservice to add a task and the value of assignedTo field is: userid;#username (ex. 87;#john smith). When I submit this a task gets created but the user it is assigned to is not john smith, it is someone else.

When I use CAML viewer I see that the id of john smith is actually 218, so I tried adding a task with assignedTo = 218;#john smith and it gets assigned right.

How come the id of the userinforesponse is different than the actual id?

I also tried to send the assignedTo field as: domain\username, but then I get this response: "The operation failed because an unexpected error occurred". So I think the assignedTo field has to be in this form for it to work: id;#username

thx for the help

+1  A: 

A user's ID is unique to each site collection. Perhaps the URL that you are using for your UserGroup.asmx webservice is different than the Lists.asmx one? They should probably be the same: http://sharepoint/sites/SiteCollection/_vti_bin/Lists.asmx and http://sharepoint/sites/SiteCollection/_vti_bin/UserGroup.asmx.

Kit Menke
omg, you are right, I linked the usergroup.asmx to another sharepoint site, stupid me :p
Rise_against
Haha glad to help. :)
Kit Menke