使用Google App脚本将文件的所有权转让给我组织之外的用户

问题描述

我想在google apps脚本中更改文件的所有者。 我尝试了以下代码

function changeOwner() {
  
  var file = DriveApp.getFileById("id");
  file.setowner("[email protected]");
  
}

生成异常错误:参数无效。 [email protected]不是我的组织的成员。

您能帮助我将所有权转让给组织外部的用户吗?

解决方法

您不得将个人云端硬盘中文件的所有权转让给组织外部的用户

如果尝试-您会收到上述错误:

例外:参数无效