The Google Data Studio Custom Connector CLI depends on a command line utility called clasp to handle authenticated actions on Google Apps Script (i.e., the service that runs the custom connector code).

I have saved copies of both of my current credentials in my home directory as .clasprc.dm.json and .clasprc.radworks.json. I can manually swap between those, renaming the one I want to use as .clasprc.json.

In order to change users:

  1. Install clasp with npm install -g @google/clasp
  2. Run clasp login
  3. Authenticate with the new account in the browser window that pops up

This creates (or updates) a file ~/.clasprc.json which serves as the global authentication for any commands that call clasp.

There may be a way to create a local authentication file which would be the best way, but I haven’t tried it.

Notes