JavaScript的活动目录用户/组查询目录、用户、JavaScript

2023-09-09 21:37:27 作者:倾城乱世

是否有可能从javascript来查询广告?

Is it possible to query AD from javascript?

我是从SharePoint中的工作,我可以使用一些JS,我发现在博客上获取当前的SharePoint用户的信息。

I'm working from within SharePoint, and I can get the current SharePoint user's information using some js I found on a blog.

但我想,如果我可以再查询AD,看看如果当前用户是在一个特定的AD组。

But I'm wondering if I can then query AD to see if the current user is in a specific AD group.

推荐答案

我想你会更好写一个快速的asp.net页面,你可以通过AJAX调用,并得到一些JSON回来。 .NET目录服务类将是在谈论到Active Directory比JavaScript的好多了,除非你能找到一个js库专门为这个(我一直没能找到)。

I think you'd be better off writing a quick asp.net page that you could call via AJAX and get some JSON back. .NET directory services class are going to be much better at talking to Active Directory than javascript, unless you can find a js library specifically for this (which I haven't been able to find).