I got a REST API call to our SP Online Instance that is not working in any way:
Method: POST
Endpoint: https://xyz.sharepoint.com/sites/ATestSite/_api/web/sitegroups(5)/users
Header:
Accept application/json;odata.metadata=none
Content-type application/json
Content:
{'LoginName':'i:0#.f|membership|xxx.yyy@zzz.com'}
This results in a 400 error: Value does not fall within the expected range. I got the login name from the system when I looked up the siteuser through REST
if I change the content to {'LoginName':'xxx.yyy@zzz.com'}
I get a 404 error: The user does not exist or is not unique.
Anybody got any idea? Thanks in advance!