通过Web服务确定用户是否存在于SharePoint组中 [英] Tell if user exists in SharePoint Group through web service

查看:60
本文介绍了通过Web服务确定用户是否存在于SharePoint组中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用一个内部Web应用程序,该应用程序将使用预定义的SharePoint组来确定用户的安全级别.我进行了一些研究,发现SharePoint的用户组" Web服务具有方法"GetUserCollectionFromGroup()",该方法将列出给定SharePoint组中的所有用户.

我遇到的问题是一些预定义的SharePoint组中添加了Active Directory组,而不是单个用户.因此,当我调用GetUserCollectionFromGroup("Members")时,将获得Active Directory组"DOMAIN \ domain users \"的单个条目.是否可以仅使用SharePoint Web服务来检查用户或该用户所属的Active Directory组是否是SharePoint组的成员?还是我需要检查SharePoint组,然后查找任何和所有Active Directory组,以查看该用户是否也是该成员?

解决方案

Active Directory安全组在SharePoint中被视为用户".您无法以您想要的方式实现这一目标.

但是,由于您确实具有DOMAIN \ group,因此可以在单击SharePoint webservices API并使用System.DirectoryServices命名空间解析用户后扩展代码.您可以在此处上找到如何获得用户的好例子.. >

I am working on an internal web application that will use predefined SharePoint groups for determining a user's security level. I have done some research and found SharePoint's "usergroup" web service which has the method "GetUserCollectionFromGroup()" which will list all of the users in a given SharePoint group.

The problem I am having is some of the predefined SharePoint groups have Active Directory groups added to them, not the individual users. So, when I call GetUserCollectionFromGroup("Members") I get back a single entry for the Active Directory group "DOMAIN\domain users\". Is there a way to check if either a user or an Active Directory group that the user belongs to is a member of a SharePoint group using only SharePoint web services? Or will I need to check the SharePoint group and then lookup any and all Active Directory groups to see if this user is a member there also?

解决方案

Active Directory Security Groups are seen as "Users" in SharePoint. You cannot achieve that in the way you want.

But since you do have the DOMAIN\group you can extend your code after you hit the SharePoint webservices API and use the System.DirectoryServices namespace to resolve your users. You can find a good example on how to get users from a group here.

这篇关于通过Web服务确定用户是否存在于SharePoint组中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆