Skip to content
SurogateDocs

My tokens

A token lets the command line or a script act as you, without your password. For a program that is not you, make a service account instead. Everyone who signs in to the console has My tokens. A token can do what you can do in the console, no more.

  1. Press New token.
  2. Name it so you know it later, such as “laptop” or “nightly backup”.
  3. Tick its Scopes: what the token may do. Your own account is ticked to start with.
  4. Press Create token.
  5. Press Copy and keep the token somewhere safe. The console shows it this once: “Copy it now. You won’t be able to see it again.”
  6. Press Close.
My tokens: the tokens laptop and smoke, each with the start of its value, its scopes, and when it was created and last used.

A token starts with pat_. The list shows the first characters after it, so you can tell your tokens apart, with its scopes and when it was created and last used.

A token can only do what its scopes allow, and never more than you can do in the console. Give a token only the scopes it needs:

ScopeWhat the token may do
Your own accountRead your details and permissions
Read users, groups and settingsRead the tenant’s users, groups, organizations and sign-in settings
Read how the portal is builtRead the sites, pages, apps, events, and group and organization names, never people; for a coding agent
Change users, groups and settingsChange them too
Roles, passwords and other tokensGive roles, set passwords, link accounts, and make SCIM tokens and service accounts
Read the audit logRead and export the audit log
Export and erase personal dataAnswer personal data requests
Manage tenantsCreate and change tenants, for install administrators
Make preview environmentsMake, sync and delete previews with fake people, and sign in to them; nothing of the portal itself. Given by name only, by an administrator
Propose changesPropose changes to the sites, for an administrator to approve under Proposed changes, and read your own proposals; never approve them. Given by name only, by an administrator
Full accessAll of the above, but making previews and proposing changes

A token made before scopes existed has Full access. A token asked to do something its scopes do not allow is refused: “This token is not allowed to do this.”

From the command line:

 
portal tokens create <name> --scope tenant:read

Press Revoke beside it, then Revoke again to confirm. Whatever uses it can no longer connect. Revoked tokens stay in the list, marked Revoked.

Revoke a token you no longer use, or one that may have been seen by someone else, and create a new one.