I would like to change the owner of a file in google apps script. I tried following code:
function changeOwner() {
var file = DriveApp.getFileById("id");
file.setOwner("dummy@gmail.com");
}
It generate an exception error: Argument is not valid. dummy@gmail.com is not a member of my organisation.
Could you help me to transfer ownership to a user outside my organisation?