如何 remove/fix 来自邮件的警告 "this mail outside the organization" Google 驱动器 API 授予的访问权限

how to remove/fix the warning from mail "this mail outside the organization" the access given by Google Drive API

public function shareGoogleSheet(Google_Service_Drive $service, string $email, array $role, string $spreadsheetId, string $name)
{
    $newPermission = new Google_Service_Drive_Permission();
    $newPermission->setEmailAddress($email);
    $newPermission->setType(self::SHARED_TYPE);
    $newPermission->setRole($role);
    try {
        $service->permissions->create($spreadsheetId, $newPermission);
    } catch (\Exception $e) {
        $this->logger->error($name . $e->getMessage());
    }
}

我用于共享邮件的代码。现在我配置了用于共享邮件的服务帐户...

Warning images

最后,您遇到的问题与 API 无关,更多的是与您的域配置有关。

联系管理员,以便他更改设置: