Skip to content

Development information

Kim Nilsson edited this page Sep 1, 2021 · 2 revisions

Links to old to copyable development versions of SPOGOU. It's recommended you instead use the addon.

Old "addon" dev version SPOGOU addon template

Old script dev version SPOGOU script template

You can create a copy of this and use that internally. No need to come back here again. Unless you're interested in future updated versions of the script, of course. :-)

When you want to create a list of credentials

  1. Click the link with a delegated admin (often superadmin) account, and create a copy of this original.

However, do note that the user running the script doesn't have to be a superadmin! The delegated admin only needs to be able to change passwords, force password changes, and have Groups API read access. So it doesn't even need to be group admin!

It's easy to create a custom admin role for this, with only password reset (with forced change) and read access to groups.

  1. Remove Copy of and - Template from name of spreadsheet. Best is to name the sheet so it refers to whose credentials it will contain when it is finished.

  2. Run Set password on group of users / Prepare sheets. It should ask for authorisation.

  3. Allow access to your superadmin/Delegated Admin account. Else nothing will work.

The script will run, create and prepare a number of sheets.

Nothing happened?

If the script doesn't run after authorisation (Don't look away!), run 'Prepare sheets' again.

No change?

If you see the script running, but you don't observe a change after the script has run (it should add four sheets/tabs at the bottom of the page), reload the entire sheet by clicking the 'refresh' button. The script will have changed the sheet.

  1. Fill in the necessary data in the Indata sheet.

  2. Then run Prepare passwords.

  3. Check the passwords, and if they look fine, run Set passwords.

Passwords will be set, temporarily logged in sheet Log, and the entire sheet will be shared with entered teacher. The spreadsheet will also be cleaned up and unnecessary tabs/sheets will be removed.

  1. When you are done, you need to remove the project from the sheet. Open the Script Editor go to File menu and click Remove Project. If you don't, then the script will be available to the teacher you just shared the list with, and you run a risk of them messing things up.

If you don't want to create a Sheet copy, the scripts are also available here in this repo.

DO NOTE! If you copy the scripts from here, instead of copying the entire Sheets file, you will have to enable the API manually. Here's how you do that. Click the following menus.

Tools / Script Editor Resources Advanced Google Services

Then click the button for

Admin Directory API

Ok and save.