Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

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 .

share|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
add comment

Use Id equal to "-1".

Example: -1; #corp\username

More information is here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.