Hi @Jackson Smith ,
According to my research and testing, you can use the following REST API to remove specific user from item:
POST https://xxxxx.sharepoint.com/sites/xxx/_api/web/lists/getbytitle('<listName>')/items(<ID>)/roleassignments/removeroleassignment(principalid=<userID>,roleDefId=1073741827)
To get the user's principal ID, please use the following REST API:
GET https://xxxxx.sharepoint.com/sites/xxx/_api/web/siteusers/getbyemail('xxx@xxxx.com')
To get the roledefID , please use the following REST API:
GET https://xxxxx.sharepoint.com/sites/xxx/_api/web/roledefinitions/getByName('contribute')
My test result:
- Get the user's principal ID:
- Get the roledefID:
- Remove specific user from item:
In addition, as far as I know, unfortunately, there is currently no way to change the owner of a file using REST API.
Hope it can help you. Thanks for you understanding.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.