sso.generateSuiteSignOnToken(options)

Note:

The content in this help topic pertains to SuiteScript 2.0.

Method Description

Method used to generate a new SuiteSignOn token for a user.

Note:

To use this method, Outbound Single Sign-on and SOAP web services must be enabled in your account. To enable these features, go to Setup > Company > Enable Features. On the SuiteCloud tab, in the Manage Authentication section, select the SuiteSignOn box. In the SuiteTalk section, select the SOAP Web Services box. Click Save.

Returns

URL, OAuth token, and any integration variables as a string

Supported Script Types

Portlet scripts, user event scripts, and Suitelets

For more information, see SuiteScript 2.x Script Types.

Governance

20 units

Module

N/sso Module

Since

2015.2

Parameters
Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

Since

options.suiteSignOnId

string

required

The scriptId specified on the SuiteSignOn record.

To see a list of IDs for SuiteSignOn records, go to the SuiteSignOn list page (Setup > Integration > SuiteSignOn).

Note:

You should create a custom scriptId for each SuiteSignOn record to avoid naming conflicts should you decide use SuiteBundler to deploy your scripts into other accounts.

2015.2

Errors

Error Code

Message

Thrown If

INVALID_SSO

Invalid SuiteSignOn reference: {1}. That SuiteSignOn object does not exist or has been marked as inactive.

The suiteSignOnId input parameter is invalid or does not exist.

Note:

The suiteSignOnId input parameter must be a scriptId and not an internal id.

SSO_CONFIG_REQD

The SuiteSignOn object {1} is not configured for use with this script. You must specify the script as a connection point for this SuiteSignOn.

The suiteSignOnId input parameter is missing.

Syntax
Important:

The following code snippet shows the syntax for this member. It is not a functional example. For a complete script example, see N/sso Module Script Samples.

          //Add additional code 
...
var suiteSignOnRecordId = 1;
var url = sso.generateSuiteSignOnToken('customsso1'); 
...
//Add additional code 

        

Related Topics

N/sso Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices