0

We have a SharePoint 2013 On premise environments and having the Domain Groups with the Names contains SPECIAL characters as below. enter image description here

I want get the Domain Group Id and assign READ permission using Rest api

I tried to get the ID of the Group as below

_api/web/sitegroups/getbyname('(Role)x$Customer$2838')?$select=id

and Got the Group cannot be found. error.

I tried with replacing the special characters as below, But no luck

enter image description here

  • 1
    You cannot get domain groups from SharePoint as they are domain groups. _api/web/sitegroups only returns SharePoint groups. – Jussi Palo Sep 21 '18 at 9:00
0

to get sharepoint group id using rest having special character in group name.

var groupName = encodeURIComponent('(Role)x$Customer$2838');
_api/web/sitegroups/getbyname('+groupName+')?$select=id

And you cannot get domain group direct using the sharepoint rest api.

0

I am able to get the solution from the post How to add an AD group to a SP group using REST api?

"/_api/web/siteusers?$select=id,Title&$filter=PrincipalType eq 4 and Title eq '(Role)x$Customer$2838'";

Your Answer

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

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