1

I use JSOM to get Sharepoint group of my user like this and it's working perfectly :

userGroups  = currentUser.get_groups();
context.load(userGroups);
var groupsEnumerator = userGroups.getEnumerator();

while (groupsEnumerator.moveNext()) {
    var group = groupsEnumerator.get_current();
    groups.push(group.get_title());
}
userConstants.user.groups = groups;

So I am in 2 groups by my username. And I am in 1 group AD, this group AD is in a SharePoint group.

In "userConstants.user.groups", I have my 2 groups I am by my username, but I don't retrieve my group I am by AD.

I hope I was clear.

Thank you.

Your Answer

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

Browse other questions tagged or ask your own question.