title: authenticate app scripts with multiple account
body: <p>in Google drive, I am trying to copy a folder from a personal account (Account A)  to a corporate workspace account(Account B).</p>
  <p>I am trying to run the script, credit to <a href="https://stackoverflow.com/questions/66464902/how-to-copy-a-folder-from-google-drive-to-create-a-new-folder-in-google-drive-us/66473822#66473822">ref</a></p>
  <pre><code>/**
   * Entry point to execute with the Google Apps Script UI
   */
  function copyFolder() {
    // Get the folders (by ID in this case)
    sourceID = &quot;xxxxxxxxxx&quot;
    targetID=&quot;xxxxxxxxx
    const toCopy = DriveApp.getFolderById(sourceID )      
    const copyInto = DriveApp.getFolderById(targetID) //error in  this line 
  
    // Call the function that copies the folder
    copyFolder_(toCopy, copyInto)
  }
  </code></pre>
  <p>I am trying to run this script as the user in account A.
  Error as follows.</p>
  <pre><code>Exception: No item with the given ID could be found. Possibly because you have not edited this item or you do not have permission to access it.
  </code></pre>
  <p>The reason is <code>targetID</code> ref to a folder in Account B.</p>
  <p>How to grant the ACCOUNT A user the right to put something in ACCOUNT B?</p>