SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I created a new SharePoint group using UI.
I do not see the group using:

$web.Groups | select Name

Why? (I need to access to the group by CSOM but the group is not found)

share|improve this question
up vote 1 down vote accepted

There is no Groups property for Web client object

Use Web.SiteGroups property to get the collection of groups for the site collection, for example:

$web.SiteGroups | select Name  
share|improve this answer
var currentContext = new SP.ClientContext.get_current();
var currentWeb = currentContext.get_web();

var currentUser = currentContext.get_web().get_currentUser();

var allGroups = currentWeb.get_siteGroups();

var group = allGroups.getByName(groupName);
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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