Skip to main content
added 24 characters in body
Source Link
Eric Alexander
  • 43.4k
  • 10
  • 54
  • 93

I'm trying to use the REST API in SharePoint 2013 to get the site groups.

I've been using this link for a little help... http://msdn.microsoft.com/en-us/library/jj245927.aspx

It's to do it with the Client Object Model and the REST API, I have tried both. The problem is that when I call to get Site Groups, with any of the below example urls (or using the JSOM) I seem to get every group in the whole site collection. Not just those specific to the site (SPWeb).

// I expect to get the groups in the root SPWeb

http://{sitecollection}/_api/Web/SiteGroups

// I expect to get the groups in the root SPWeb

    http://{sitecollection}/_api/Web/SiteGroups 

I expect to get the groups in the SPWeb at /<subsite>/<subsite2>, but I get the same result as the above call. http://{sitecollection}/{subsite}/{subsite2}/_api/Web/SiteGroups

http://{sitecollection}/{subsite}/{subsite2}/_api/Web/SiteGroups 

The extra groups I am seeing are actually in subsite2, but even when I change to subsite/subsite3, I still get the same result?

It's like they are cached calls or something...is there something I am missing?? Is this call related to the calling user at all?

The server side object model does not have this problem and works as expected.

I'm trying to use the REST API in SharePoint 2013 to get the site groups.

I've been using this link for a little help... http://msdn.microsoft.com/en-us/library/jj245927.aspx

It's to do it with the Client Object Model and the REST API, I have tried both. The problem is that when I call to get Site Groups, with any of the below example urls (or using the JSOM) I seem to get every group in the whole site collection. Not just those specific to the site (SPWeb).

// I expect to get the groups in the root SPWeb

http://{sitecollection}/_api/Web/SiteGroups

I expect to get the groups in the SPWeb at /, but I get the same result as the above call. http://{sitecollection}/{subsite}/{subsite2}/_api/Web/SiteGroups

The extra groups I am seeing are actually in subsite2, but even when I change to subsite/subsite3, I still get the same result?

It's like they are cached calls or something...is there something I am missing?? Is this call related to the calling user at all?

The server side object model does not have this problem and works as expected.

I'm trying to use the REST API in SharePoint 2013 to get the site groups.

I've been using this link for a little help... http://msdn.microsoft.com/en-us/library/jj245927.aspx

It's to do it with the Client Object Model and the REST API, I have tried both. The problem is that when I call to get Site Groups, with any of the below example urls (or using the JSOM) I seem to get every group in the whole site collection. Not just those specific to the site (SPWeb).

// I expect to get the groups in the root SPWeb

    http://{sitecollection}/_api/Web/SiteGroups 

I expect to get the groups in the SPWeb at <subsite>/<subsite2>, but I get the same result as the above call.

http://{sitecollection}/{subsite}/{subsite2}/_api/Web/SiteGroups 

The extra groups I am seeing are actually in subsite2, but even when I change to subsite/subsite3, I still get the same result?

It's like they are cached calls or something...is there something I am missing?? Is this call related to the calling user at all?

The server side object model does not have this problem and works as expected.

Post Undeleted by SteveCl
Post Deleted by SteveCl
Source Link
SteveCl
  • 323
  • 2
  • 5
  • 14

Using REST API to get Site Groups in SP 2013

I'm trying to use the REST API in SharePoint 2013 to get the site groups.

I've been using this link for a little help... http://msdn.microsoft.com/en-us/library/jj245927.aspx

It's to do it with the Client Object Model and the REST API, I have tried both. The problem is that when I call to get Site Groups, with any of the below example urls (or using the JSOM) I seem to get every group in the whole site collection. Not just those specific to the site (SPWeb).

// I expect to get the groups in the root SPWeb

http://{sitecollection}/_api/Web/SiteGroups

I expect to get the groups in the SPWeb at /, but I get the same result as the above call. http://{sitecollection}/{subsite}/{subsite2}/_api/Web/SiteGroups

The extra groups I am seeing are actually in subsite2, but even when I change to subsite/subsite3, I still get the same result?

It's like they are cached calls or something...is there something I am missing?? Is this call related to the calling user at all?

The server side object model does not have this problem and works as expected.