Linkssotoken

Link a Single Sign-On token to a user.

For information on how to work with sessions, refer to the documentation on using single sign-on.

Tokens

This action requires the following tokens:

  • user-sso-token

Arguments

Required arguments are marked in bold, and optional arguments are marked in italics.

Argument Type Default Description
user Hash   The ID of the User to link an SSO token to
service Hash   The ID of the SSO service for which the response is usable
response String   An SSO response for the given user from the given service

Output

This action produces the following output on success:

An object containing the following fields:

Name Type Description
id Hash User ID
username String User name
active Boolean Whether this user is active
datecreated DateTime When this user was created
datemodified DateTime When this user was last modified
email String Email address
mobilephone String Mobile phone nr
firstname String First name of the user
lastname String Last name of the user
address String Address of the user
zipcode String ZIP code of this user
city String City of this user
sessionsenabled Boolean Whether sessions are enabled for this user
timezone TimeZone Timezone for this user
customer

Customer of this user

The value of this field is an object containing the following fields:

Name Type Description
id Hash Customer ID
name String The name of this customer
datecreated DateTime When this customer was created
datemodified DateTime When this customer was last modified
singlesignontokens

Single-sign on tokens for the user

The value of this field is an array containing zero or more elements, each one being an object containing the following fields:

Name Type Description
service

The single-sign on service for this token

The value of this field is an object containing the following fields:

Name Type Description
id Hash Single-sign on service ID
type Label The type of the single-sign service
name String The name of this service
token String The token

Errors

This action can return one of the default status codes, or one of the following status codes on error:

STATUS_USER_NOT_FOUND (310)
The user specified in the user argument cannot be found.
STATUS_SSO_SERVICE_NOT_FOUND (430)
The SSO services specified in the service argument cannot be found.
STATUS_USER_ALREADY_HAS_SSO_TOKEN (431)
The given user already has an SSO token for the given SSO service. If the token must be changed, clear the old token first.
STATUS_SSO_RESPONSE_INVALID (433)
The given SSO response is invalid.