0

I need to check if user is part of an AD Group with Javascript.

I've created a SP group and I added an AD Group to it and I am part of this group.

I removed my user from Site Administrators and Site owners (group with full control).

Then I tried the code found here: https://stackoverflow.com/a/43673723/2185964

But the code above did not worked. Is it possible that it is an issue caused by users profile sync? Or there is a way to add to SharePoint user profile the AD group or OU or AD directory where an user belongs and get this property using JavaScript?

3
  • I'm using SharePointPlus for this kind of operations. You can check this. aymkdn.github.io/SharepointPlus/people.html#distributionLists
    – newbie
    Jul 18, 2019 at 5:06
  • I didn't know SharePointPlus, but it seems great! But getUserInfo returns always "User cannot be found" (also checking with "domain\\myuser")
    – Pepozzo
    Jul 18, 2019 at 9:55
  • Yes, It's a great library. Thanks to @AymKdn who is a member of this platform :)
    – newbie
    Jul 19, 2019 at 13:56

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.