0

I am trying to retrieve the users of a SharePoint group via the REST API. First I use this URL https://tenant.sharepoint.com/sites/SiteXY/_api/web/sitegroups/ to get all the SharePoint groups of the site. This works just fine with my app-only token, which has the role "Sites.FullControl.All".

Now I want to get the members of one of the groups by using "https://tenant.sharepoint.com/sites/SiteXY/_api/web/sitegroups/GetById(id of the group)/Users" And here I get "-2147024891, System.UnauthorizedAccessExceptionAttempted to perform an unauthorized operation."

What am I doing wrong here? I can open this URL in a web browser as a normal user of the SharePoint site and I get the xml result.

Thanks for your help!

1
  • In your group settings, you can parameter who can view users from this group Commented Apr 1 at 9:19

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.