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


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, 2018 at 9:00

2 Answers 2


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'";

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

var groupName = encodeURIComponent('(Role)x$Customer$2838');

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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