views:

172

answers:

1

Is there any way with the built-in SharePoint web services which can give us the information about the Active Directory users present in a SharePoint Group?

A: 

Yes. Use UserGroup.GetUserCollectionFromGroup.

Returns information about the collection of users in the specified group.

Alex Angas
Glad this didn't have to be yet another "you can't do this with the web services" answer.
Alex Angas
Thanks for the reply. This gives us the information about the users present in the specified group. But how can we differentiate the Windows user and AD user in the returned information?
Nagendra
@Nagendra: Sorry I don't understand your question. What is the difference between a Windows user and AD user in your environment?
Alex Angas
On my SharePoint Server, I have added an AD user(user1) and a windows local administrator (administrator) into a SharePoint group. When I use GetUserCollectionFromGroup command, I get to see both User1 and administrator. Now how can I differentiate which one is AD user account and which one is not.
Nagendra
@Nagendra: The only way is from the `LoginName` attribute. Domain users should be prefixed with the name of the domain. Local users should be prefixed with the name of the computer. Note: I have not tried this scenario.
Alex Angas
Thanks for your update.
Nagendra
@Nagendra: If this solves the problem, please mark it as the answer to your question. If it doesn't, please let us know why.
Alex Angas