How do I use SPMemember.ID property to get User or Group

Posted by Jason on Stack Overflow See other posts from Stack Overflow or by Jason
Published on 2010-03-25T17:59:00Z Indexed on 2010/03/25 18:13 UTC
Read the original article Hit count: 161

Filed under:
|

I have to write a utility to enumerate and manage the owners of groups within a SharePoint site. I know I can use the Groups property of the SPWeb object to retrieve a collection of groups. And I know I can use the Owner property of the group to get back the owner.

My problem is that I do not know what to do next. The SPGroup.Owner property returns a SPMember object. The member object has one property called ID that returns the unique ID (an integer) of the member. What I cannot seem to find information on is how to use that integer value to determine if the member is a User or a Group and how to get back additional details (say the name).

Any ideas?

Thanks.

© Stack Overflow or respective owner

Related posts about sharepoint

Related posts about api