如何从添加到SharePoint组中的AD组中检索所有AD用户 [英] How to Retrieve all AD user from AD Group which added in SharePoint Group

查看:82
本文介绍了如何从添加到SharePoint组中的AD组中检索所有AD用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用CSOM从AD组中获取用户,该用户已添加到共享点中的组中.

I would like to get users from AD group which added as a group in sharepoint by using CSOM .

请尽早分享方法/代码.

Please share the approach/code at earliest.

谢谢

推荐答案

据我所知,SharePoint没有提供CSOM API来满足此要求.

Per my knowledge, SharePoint not provide CSOM API to achieve this requirement.

作为一种解决方法,我们可以使用服务器对象模型创建一个自定义REST服务来实现它,然后在客户端调用REST服务.

As a workaround, we can create a custom REST service with Server Object Model to achieve it, then call the REST service in client side.

bool reachedMaxCount;
SPWeb web = SPContext.Current.Web;
int limit = 100;
string group = "Domain\\SecurityGroup";
SPPrincipalInfo[] users = SPUtility.GetPrincipalsInGroup(web, group, limit, out reachedMaxCount);

SharePoint 2013:创建在SharePoint中托管并在WSP中部署的自定义WCF REST服务

SharePoint 2013: Create a Custom WCF REST Service Hosted in SharePoint and Deployed in a WSP

更多信息:

最好的问候,

丹尼斯


这篇关于如何从添加到SharePoint组中的AD组中检索所有AD用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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