Users exist in sharepoint group: enter image description here

If I do simple GET request in browser: https://mycompany.sharepoint.com/sites/testsite2/_api/web/sitegroups/getbytitle('TestGroup')/users/getbyemail('[email protected]')

Returns error: "Cannot find resource for the request getbytitle." enter image description here

1 Answer 1


Your request should be using GetByName instead of GetByTitle

So your request should be: https://mycompany.sharepoint.com/sites/testsite2/_api/web/sitegroups/getbyname('TestGroup')/users/getbyemail('[email protected]')

Reference: https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-rest-reference/dn531432%28v%3doffice.15%29

  • Wow. Thanks. Don't know where I got hold of GetByTitle
    – akg1421
    Mar 24, 2020 at 14:30
  • My code: pastebin.com/ZAJyCxVS I was making api call to remove user from SP group on delete button onclick. It was working fine but i changed getbytitle to getbyname and strangely click function has stopped working. Debugger doesn't work now inside onclick List view: imgur.com/z3m1h9O
    – akg1421
    Mar 24, 2020 at 20:53
  • I think this one warrants a question of its own, how is the code injected? Mar 25, 2020 at 5:40
  • Code injected inside AllItems.aspx page via SP Designer... under <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server"> tag. Works fine and stops under anything inside $(document).ready but click never gets triggered
    – akg1421
    Mar 25, 2020 at 8:20
  • 1
    SharePoint Framework! Mar 25, 2020 at 11:30

Your Answer

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

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