I wonder if anyone knows a solution to this problem:

I am submitting some fields to a Sharepoint List. In detail some values are passed to the Sharepoint lists.asmx Webservice.

Problem is: I want to pass a person into a data field, which is a "Person or Group" field. So I have to pass a string in this format: "1;#Username,#someMoreValues" respectively "ID;#" in enough. But this ID is an internal ID, which Sharepoint uses for a reason, I don't want to know ;)

Is there any chance, to get this ID via the Sharepoint webservices? The userprofileservice.asmx and the getuserinfo.asmx will return anything but the ID.

Any Ideas?

link|improve this question
feedback

2 Answers

up vote 0 down vote accepted

I haven't had a chance to check and make sure this is for sure what you are looking for, but I'm reasonably sure that what you want is to use the People.asmx web service, SearchPrincipals method. It returns a collection of user principals, and one of the fields is UserInfoID .

link|improve this answer
Thanks, it returns the ID, I was looking for! (So i got some new questions, but that will be a new post) – powerbar Sep 4 '09 at 9:00
feedback

Use Id equal to "-1".

Example: -1; #corp\username

More information is here

link|improve this answer
feedback

Your Answer

 
or
required, but never shown