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
2009-09-18 13:44:30
Glad this didn't have to be yet another "you can't do this with the web services" answer.
Alex Angas
2009-09-18 13:45:22
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
2009-09-21 08:58:32
@Nagendra: Sorry I don't understand your question. What is the difference between a Windows user and AD user in your environment?
Alex Angas
2009-09-21 09:04:15
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
2009-09-21 09:26:05
@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
2009-09-21 09:48:50
Thanks for your update.
Nagendra
2009-09-21 15:12:57
@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
2009-09-21 15:35:59