4

There is active directory group added to SharePoint group. How would we can check that the logged in user is member of that active directory group using ECMA script?

1

You can't out of the box.

If you still need to do this, then look into expanding the rest api, to allow this. But a caveat on this, is this will only be possible on premises.

Reference material: http://blogs.architectingconnectedsystems.com/blogs/cjg/archive/2014/04/17/Extending-SharePoint-2013-REST-APIs.aspx

1

Workaround

  1. Create a hidden list
  2. Break inheritance of the list
  3. Give read permission only to the SharePoint group in question
  4. Try reading from the list using JSOM
  5. If read succeeds then the current user is part of the AD group, else not

Note - The above solution is not tested

  • Thanks. Was looking for a way to add validation on a people picker for a specific AD group. – David Aug 14 '15 at 11:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.