Below is the Post call, with request body details
//Rest URI
_api/web/siteusers
//headers
{
"Accept": "application/json; odata=verbose",
"content-type": "application/json; odata=verbose"
}
//Body
{ "__metadata": { "type": "SP.User"},
"LoginName": "<<Login Name>>",
"IsSiteAdmin":"true"
}
we are actually setting the IsSiteAdmin flag to true, if we want to remove SCA, we can set it to false.Note: If the site already has this user, it will update the existing user
No comments:
Post a Comment