We have a Permissions groups of around 4k in our site collection. In the same site I have created a sub site and given the permissions up to 2k groups. Now when I try to get the groups data in the sub site I am getting all the 4K groups as they were in site collection level. I tried to filter them with permission level as we roledefid to know the permission of the group. But here when I try to get all the groups I am not getting roledefid property in the object. Is there any query to get roledefid to all the groups.
Code I used to get the groups:
url = _spPageContextInfo.webAbsoluteUrl + "/_api/web/sitegroups";
$.ajax({
url: url,
method: "GET",
async: async,
headers: {
"Accept": "application/json; odata=verbose"
},
success: function(data) {
console.log(data);
},
error: OnError
});
Result i am getting with properties:
AllowMembersEditMembership: true
AllowRequestToJoinLeave: false
AutoAcceptRequestToJoinLeave: false
Description: ""
Id: 1977
IsHiddenInUI: false
LoginName: "GroupName"
OnlyAllowMembersViewMembership: false
Owner: {__deferred: {…}}
OwnerTitle: "GroupName"
PrincipalType: 8
RequestToJoinLeaveEmailSetting: null
Title: "GroupName"
Users: {__deferred: {…}}
__metadata: {id: "url", uri: "url", type: "SP.Group"}
__proto__: Object