Forum Discussion
Fromelard
Mar 30, 2017Iron Contributor
Office 365: Add accounts into the Site collection administrators list via PowerShell and CSOM
To add accounts (group or User) into the SPO SIte collection admin via code, there are 2 possible solutions: Via PowerShell and SPO Admin Really simple case ideal for one shot action, you need t...
Harsha S
Mar 26, 2018Copper Contributor
Is it possible to retrieve the Group ID using CSOM ? I dont find any attribute in the Group class for the same. There is id attribute however, it is just number.
- Mikael SvensonMar 26, 2018Iron ContributorIf you get the Site object of the site, you can then get the group id from the .GroupId property.
var site = context.Site;
context.Load(site, s=>s.GroupId);
context.ExecuteQuery();