REST api call using method getbyemail for user in a group returns error “Cannot find resource for the request getbytitle”
-
08-02-2021 - |
Question
Users exist in sharepoint group:
If I do simple GET request in browser: https://mycompany.sharepoint.com/sites/testsite2/_api/web/sitegroups/getbytitle('TestGroup')/users/getbyemail('john.theuser@mycompany.com')
Returns error: "Cannot find resource for the request getbytitle."
Solution
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('john.theuser@mycompany.com')
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange