sso.generateSuiteSignOnToken(options)
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 |
|
Since |
2015.2 |
Parameters
The options
parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
Since |
---|---|---|---|---|
|
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 SuiteSignOn reference: {1}. That SuiteSignOn object does not exist or has been marked as inactive. |
The
Note:
The |
|
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 |
Syntax
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