Authenticationguide
Authenticationguide
2020.2
This software and related documentation are provided under a license agreement containing restrictions
on use and disclosure and are protected by intellectual property laws. Except as expressly permitted
in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast,
modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any
means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for
interoperability, is prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-
free. If you find any errors, please report them to us in writing.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it
on behalf of the U.S. Government, then the following notice is applicable:
U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software,
any programs installed on the hardware, and/or documentation, delivered to U.S. Government end
users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation
and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and
adaptation of the programs, including any operating system, integrated software, any programs installed
on the hardware, and/or documentation, shall be subject to license terms and license restrictions
applicable to the programs. No other rights are granted to the U.S. Government.
This software or hardware is developed for general use in a variety of information management
applications. It is not developed or intended for use in any inherently dangerous applications, including
applications that may create a risk of personal injury. If you use this software or hardware in dangerous
applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other
measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages
caused by use of this software or hardware in dangerous applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks
of their respective owners.
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks
are used under license and are trademarks or registered trademarks of SPARC International, Inc.
AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of
Advanced Micro Devices. UNIX is a registered trademark of The Open Group.
This software or hardware and documentation may provide access to or information about content,
products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and
expressly disclaim all warranties of any kind with respect to third-party content, products, and services
unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and
its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use
of third-party content, products, or services, except as set forth in an applicable agreement between you
and Oracle.
This documentation is in pre-General Availability status and is intended for demonstration and preliminary
use only. It may not be specific to the hardware on which you are using the software. Oracle Corporation
and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to
this documentation and will not be responsible for any loss, costs, or damages incurred due to the use of
this documentation.
The information contained in this document is for informational sharing purposes only and should be
considered in your capacity as a customer advisory board member or pursuant to your pre-General
Availability trial agreement only. It is not a commitment to deliver any material, code, or functionality, and
should not be relied upon in making purchasing decisions. The development, release, and timing of any
features or functionality described in this document remains at the sole discretion of Oracle.
This document in any form, software or printed matter, contains proprietary information that is the
exclusive property of Oracle. Your access to and use of this confidential material is subject to the terms
and conditions of your Oracle Master Agreement, Oracle License and Services Agreement, Oracle
PartnerNetwork Agreement, Oracle distribution agreement, or other license agreement which has
been executed by you and Oracle and with which you agree to comply. This document and information
contained herein may not be disclosed, copied, reproduced, or distributed to anyone outside Oracle
without prior written consent of Oracle. This document is not part of your license agreement nor can it be
incorporated into any contractual agreement with Oracle or its subsidiaries or affiliates.
For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website
at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc
Oracle customers that have purchased support have access to electronic support through My Oracle
Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://
www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.
Sample Code
Oracle may provide sample code in SuiteAnswers, the Help Center, User Guides, or elsewhere through
help links. All such sample code is provided "as is” and “as available”, for use only with an authorized
NetSuite Service account, and is made available as a SuiteCloud Technology subject to the SuiteCloud
Terms of Service at www.netsuite.com/tos.
Oracle may modify or remove sample code at any time without notice.
As the Service is a multi-tenant service offering on shared databases, Customer may not use the Service
in excess of limits or thresholds that Oracle considers commercially reasonable for the Service. If Oracle
reasonably concludes that a Customer’s use is excessive and/or will cause immediate or ongoing
performance issues for one or more of Oracle’s other customers, Oracle may slow down or throttle
Customer’s excess use until such time that Customer’s use stays within reasonable limits. If Customer’s
particular usage pattern requires a higher limit or threshold, then the Customer should procure a
subscription to the Service that accommodates a higher limit and/or threshold that more effectively aligns
with the Customer’s actual usage pattern.
Beta Features
This software and related documentation are provided under a license agreement containing restrictions
on use and disclosure and are protected by intellectual property laws. Except as expressly permitted
in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast,
modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any
means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for
interoperability, is prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-
free. If you find any errors, please report them to us in writing.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it
on behalf of the U.S. Government, then the following notice is applicable:
U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software,
any programs embedded, installed or activated on delivered hardware, and modifications of such
programs) and Oracle computer documentation or other Oracle data delivered to or accessed by
U.S. Government end users are "commercial computer software" or “commercial computer software
documentation” pursuant to the applicable Federal Acquisition Regulation and agency-specific
supplemental regulations. As such, the use, reproduction, duplication, release, display, disclosure,
modification, preparation of derivative works, and/or adaptation of i) Oracle programs (including any
operating system, integrated software, any programs embedded, installed or activated on delivered
hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other
Oracle data, is subject to the rights and limitations specified in the license contained in the applicable
contract. The terms governing the U.S. Government’s use of Oracle cloud services are defined by the
applicable contract for such services. No other rights are granted to the U.S. Government.
This software or hardware is developed for general use in a variety of information management
applications. It is not developed or intended for use in any inherently dangerous applications, including
applications that may create a risk of personal injury. If you use this software or hardware in dangerous
applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other
measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages
caused by use of this software or hardware in dangerous applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks
of their respective owners.
Intel and Intel Inside are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks
are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD,
Epyc, and the AMD logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a
registered trademark of The Open Group.
This software or hardware and documentation may provide access to or information about content,
products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and
expressly disclaim all warranties of any kind with respect to third-party content, products, and services
unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and
its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use
of third-party content, products, or services, except as set forth in an applicable agreement between you
and Oracle.
This documentation is in pre-General Availability status and is intended for demonstration and preliminary
use only. It may not be specific to the hardware on which you are using the software. Oracle Corporation
and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to
this documentation and will not be responsible for any loss, costs, or damages incurred due to the use of
this documentation.
The information contained in this document is for informational sharing purposes only and should be
considered in your capacity as a customer advisory board member or pursuant to your pre-General
Availability trial agreement only. It is not a commitment to deliver any material, code, or functionality, and
should not be relied upon in making purchasing decisions. The development, release, and timing of any
features or functionality described in this document remains at the sole discretion of Oracle.
This document in any form, software or printed matter, contains proprietary information that is the
exclusive property of Oracle. Your access to and use of this confidential material is subject to the terms
and conditions of your Oracle Master Agreement, Oracle License and Services Agreement, Oracle
PartnerNetwork Agreement, Oracle distribution agreement, or other license agreement which has
been executed by you and Oracle and with which you agree to comply. This document and information
contained herein may not be disclosed, copied, reproduced, or distributed to anyone outside Oracle
without prior written consent of Oracle. This document is not part of your license agreement nor can it be
incorporated into any contractual agreement with Oracle or its subsidiaries or affiliates.
Answering the following questions will help us improve our help content:
■ Did you find the information you needed? If not, what was missing?
■ Did you find any errors?
■ Is the information clear?
■ Are the examples correct?
■ Do you need more examples?
■ What did you like most about this document?
Click here to send us your comments. If possible, please provide a page number or section title to identify
the content you're describing.
Authentication Overview
NetSuite supports many types of authentication, for authenticating in the NetSuite User Interface (UI) as
well as various authentication methods for API access to NetSuite. In this section, see:
Important: For enhanced security, NetSuite requires two-factor authentication (2FA) for all
Administrator and other highly privileged roles in all NetSuite accounts. This requirement includes
access to production, sandbox, development, and Release Preview accounts.
The Administrator and other highly privileged roles are designated as 2FA authentication required by
default, and this requirement cannot be removed. Any standard or customized roles that include highly
privileged permissions are indicated in the Mandatory 2FA column on the Two-Factor Authentication
Roles page.
For more information, see the following topics:
■ See OpenID Connect (OIDC) Single Sign-on for inbound SSO from the OIDC Provider (OP) of your
choice. See also OpenID Connect (OIDC) Access to Web Store.
■ See SAML Single Sign-on for inbound SSO using authentication from a third party identity provider
compliant with SAML v2.0. See also SAML Single Sign-on Access to Web Store.
Authentication Guide
Authentication for API Access to NetSuite 2
■ Inbound Single Sign-on is a solution for a token-based type of inbound SSO, available in NetSuite
when the Inbound Single Sign-on feature is enabled after purchase. See also Inbound Single Sign-on
Access to Web Store.
Warning: The NetSuite proprietary Inbound SSO feature is targeted for deprecation. The
deprecation schedule is as follows:
□ Targeted to occur as of the 2020.1 upgrade, customers will no longer be permitted to use
this Inbound SSO feature to create new solutions.
□ Targeted to occur before the 2021.1 release, customers should migrate their existing
solutions to use a different single sign-on solution, such as OpenID Connect (OIDC) Single
Sign-on or SAML Single Sign-on.
NetSuite supports outbound single sign-on when the SuiteSignOn feature is enabled. See Outbound
Single Sign-on (SuiteSignOn). SuiteSignOn access to NetSuite from your web store is supported. See the
help topic Outbound Single Sign-on (SuiteSignOn) Access from Your Web Store.
Note: OAuth 2.0 cannot be used with SOAP web services. For more information, see
Authentication Matrix.
Outbound Single Sign-on, called SuiteSignOn in NetSuite, is another authentication method supported
for integrations. See Outbound Single Sign-on (SuiteSignOn). Only SOAP web services is supported for
SuiteSignOn calls.
Device ID authentication is also available in NetSuite. Device ID authentication was developed for use with
the SuiteCommerce InStore (SCIS) application. However, you could develop your own applications to take
advantage of the availability of Device ID authentication in NetSuite. See Device ID Authentication. For
more information about the SCIS application, see the help topic SuiteCommerce InStore (SCIS).
Authentication Guide
Authentication Matrix 3
Authentication Matrix
The following table shows the authentication methods supported in NetSuite.
User Creden Supported Supported You should not employ user credentials You should not employ user credentials for
tials for SOAP web services. Use Token-based RESTlets. Use Token-based Authentication or
Authentication instead. Currently supported, OAuth 2.0 instead. Currently supported, with
with the exception of 2FA-required roles. the exception of 2FA-required roles.
Token-based Supported. You should use TBA for SOAP Supported. You Supported. You should use TBA or OAuth 2.0
Authenticati web services authentication. should use TBA for RESTlet authentication.
on (TBA) or OAuth 2.0
for REST web
services authen
tication.
OAuth 2.0 Supported. Supported. You should use OAuth 2.0 or TBA
You should use for RESTlet authentication.
OAuth 2.0 or TBA
for REST web
services authen
tication.
Two-Factor A Supported
uthenticatio
n (2FA) 2FA is req
uired for
highly privil
eged roles.
Warning: The NetSuite Inbound SSO feature is targeted for deprecation. The deprecation
schedule is as follows:
■ In 2020.1, customers will no longer be permitted to create new solutions using the NetSuite
Inbound SSO feature. Existing customers using this Inbound SSO feature should adapt their
solutions to use a different SSO method before the 2021.1 release, such as OpenID Connect
(OIDC) Single Sign-on, SAML Single Sign-on or Token-based Authentication (TBA).
Authentication Guide
Mandatory Two-Factor Authentication (2FA) for NetSuite Access 4
to production, sandbox, development, and Release Preview accounts. The Administrator and highly
privileged roles are designated as 2FA authentication required by default, and this requirement cannot be
removed. Certain highly privileged permissions also mandate that a role be 2FA required by default. Any
standard or customized roles that include these permissions are indicated in the Mandatory 2FA column
on the Two-Factor Authentication Roles page. For more information about highly privileged roles, see the
help topic Permissions Requiring Two-Factor Authentication (2FA).
The mandatory 2FA requirement also applies to all non-UI access. Non–UI access means accessing
NetSuite through an Application Programming Interface, or API. Web services and RESTlets are
two examples of non–UI access to NetSuite. 2FA-required roles employing user credentials for API
authentication will fail.
For more information, see Administrators: Review Roles NetSuite Designates as Mandatory 2FA.
To change the value in the Duration of Trusted Device field for a mandatory 2FA
role:
1. In your account, go to Setup > Users/Roles > Two-Factor Authentication Roles.
2. For each role that NetSuite has marked as Mandatory 2FA Required (denoted by the check mark in
the Mandatory 2FA column):
a. Evaluate the role and determine if 30 days is an acceptable value.
b. If 30 days is not the desired value, change the value in the Two-Factor Authentication
Required column from Not required to 2FA authentication required.
c. Change the Duration of Trusted Device value as desired. Otherwise, the value defaults to
30 days.
Note: Until you change the value of Two-Factor Authentication Required from Not
Required to 2FA authentication required, you cannot change the duration of trusted
devices to any value. When you change the value to 2FA required, the trusted devices
value defaults to 30 days. Ensure that you also update the value for trusted devices to
your desired value.
3. After reviewing and making any necessary changes to all mandatory 2FA required roles and
associated durations of trust, click Submit.
When a user logs in to the NetSuite UI with a Mandatory 2FA role, the user can check the Trust this
device for 30 days box. When users log in with this role, they will not be prompted to provide a
verification code again until 30 days has elapsed.
Authentication Guide
Administrators: Review Roles NetSuite Designates as Mandatory 2FA 5
For more information, see Designate Two-Factor Authentication Roles. See also Users and Trusted
Devices for Two-Factor Authentication.
If the Duration of Trusted Device value for mandatory 2FA role has been explicitly configured, the text
on the Logging in... page reflects the configured value. The user can check the box, and the device will
be trusted for the stated duration. For more information, see Users and Trusted Devices for Two-Factor
Authentication.
Authentication Guide
Password Requirements and Policies in NetSuite 6
■ Account settings that can be modified by administrators. See Password Settings That Can Be Modified.
■ System requirements that cannot be modified. See System-Defined Password Requirements.
■ PCI DSS requirements that apply to users with the View Unencrypted Credit Cards permission. See PCI
Compliance Password Requirements.
Note: Users are locked out for 30 minutes after six consecutive attempts to log in to NetSuite
with an incorrect password. For more information, see User Access Reset Tool.
■ Password Policy
■ Minimum Password Length
■ Password Expiration in Days
Password Policy
Built-in password policies support three levels of password validation for NetSuite users. These policies
enforce the following requirements for password length and content:
■ Strong: minimum length of 10 characters, at least three of these four character types —uppercase
letters, lowercase letters, numbers, non-alphanumeric ASCII characters
■ Medium: minimum length of eight characters, at least two of these four character types —uppercase
letters, lowercase letters, numbers, non-alphanumeric ASCII characters
■ Weak (Not Recommended): minimum length of six characters
■ The selected password policy determines the minimum acceptable value for the Minimum Password
Length field. The policy does not affect the Password Expiration in Days field value.
■ All NetSuite accounts are set to a Strong policy by default.
Authentication Guide
NetSuite Password Requirements 7
Note: The Strong password policy was set as the default for each account in 2014.1. The
Strong policy has been enforced for all new users added after 2014.1. However, this policy
was only enforced for users who existed before the upgrade when these users changed their
passwords. For information on how often users must change their passwords in your account,
Password Expiration in Days.
■ It is possible to reset the password policy to Medium or Weak, but this is not recommended.
Warning: If any users in your account have the View Unencrypted Credit Cards permission,
PCI password requirements take precedence. See PCI Compliance Password Requirements for
more information.
■ If a user has access to multiple NetSuite accounts that have different password policies, the strongest
policy is enforced for that user. A user is defined as an email and password pairing.
■ The password policy is not applied to users logging in to NetSuite with a customer center role and to
customers who register on your website. See Customer Roles and Passwords for more information.
■ The default value for this field is determined by the selected password policy. Because the default
password policy is Strong, the default Minimum Password Length is 10 characters.
■ You can make the minimum password length value longer than the minimum required by the policy.
You cannot make this value shorter.
■ Minimum password length for customer center roles is eight characters. See Customer Roles and
Passwords for more information.
■ Days are calculated from the date that each user last changed their password, not from the date that
the company preference is changed.
Note: As of December 2015, valid values are 1-365. Values entered before that date are not
affected by this limit. However, if any data on the General Preferences page is changed, only
valid values within this range will be accepted for the Password Expiration in Days field. For
accounts provisioned after this date, the value for Password Expiration in Days is set to 180
days by default.
■ As of 2013.2 or later, a value of 180 days is the default for all new accounts, ensuring password
rotation at least every six months. The value of the Password Expiration in Days field was not reset
for accounts that existed before 2013.2. Administrators of these accounts should set this value to a
maximum of 180 days.
■ To comply with Payment Card Industry (PCI) standards, employees with access to view unencrypted
credit card numbers are automatically required to change their passwords every 90 days, unless the
limit set here is shorter. See PCI Compliance Password Requirements for more information.
Authentication Guide
NetSuite Password Requirements 8
■ Dates of the previous password change and current password expiration are displayed in the user’s
My login audit portlet.
For information about Customer Center roles, see Customer Roles and Passwords.
Note: The Password Criteria fields are shown on any page where a user changes a password. It
ensures that the user can tell whether the proposed password meets the security rules enforced
by the system.
Authentication Guide
PCI Compliance Password Requirements 9
If the number of days set in the Password Expiration in Days field on the General Preferences page is
less than ninety days, that requirement remains in effect. For example, if your company is set to expire
passwords every sixty days, your password expiration date does not change. However, if your company is
set to expire passwords every 120 days, this setting automatically changes to 90 days for users with the
View Unencrypted Credit Cards permission.
In addition, passwords for those with access to unencrypted credit card numbers must have a minimum
of seven (7) characters. If the number of characters set in the Minimum Password Length field on the
General Preferences field is greater, that greater requirement remains in effect.
All users with access to unencrypted credit card numbers must change passwords to comply with the PCI
requirements.
When these self-service methods are not sufficient to resolve the problem, users need assistance. The
User Access Reset page provides one place for users with an Administrator role or a role with Core
Administration Permissions (CAP) to assist other users who need help with:
Important: To initiate a password reset for a user who has access to multiple NetSuite
accounts, you must be an Administrator in all of those accounts. The User Access Reset Tool is
also available to users with Core Administration Permissions, but the same restriction applies.
Users who are not Administrators but have only Core Administration Permissions cannot reset
the password for a user who has access to multiple NetSuite accounts. (See the help topic Core
Administration Permissions if you need more information about this feature.)
Authentication Guide
User Access Reset Tool 10
3. Check the appropriate box or boxes. You can check multiple boxes if the user needs help with
more than one thing.
a. Initiate Password Reset: check this box to send an email to the user containing a link so
that the user can reset the NetSuite password.
b. Clear User’s Security Questions: check this box to clear the user’s security questions. The
user will be prompted to set up new security questions and answers after the next login to
NetSuite.
c. Unlock The User’s Access: check this box to unlock NetSuite access for a user who is locked
out of NetSuite after submitting six consecutive incorrect passwords.
d. Reset 2FA Settings: check this box to reset (or clear) the user’s settings for 2FA. The user
will be prompted to enter new 2FA settings after the next login to NetSuite with a 2FA
required role.
4. Click Save.
Employee, partner, and vendor roles are considered non-customer center roles. Customers have
customer center roles. One person could use the same email address (the NetSuite username) and
could be assigned both non-customer center roles and a customer center role. However, these would be
treated by the system as two different users, because the information is maintained separately. Changing
the password for non-customer center roles has no effect on the password of the customer center role.
■ Self-service password reset: On the NetSuite login page, a user can click Forgot Your Password?.
The user will receive an email with a link to reset the password. The link in the email will expire after 60
minutes. See the help topic Getting Access When You Forget Your Password for information for users.
■ Administrator–initiated password reset:
Important: An administrator must have access to all of the accounts to which a user has
access to change that user’s password.
□ The User Access Reset Tool lets administrators assist users who are not able to reset a password,
update security questions,
or change their phone number for two factor authentication. You can also reset a user who is
locked out of NetSuite after submitting six consecutive incorrect passwords.
□ You should use the User Access Reset Tool, but you can also initiate a password reset on an
employee, partner, or vendor entity record. See the help topic Changing a User’s NetSuite
Password.
Authentication Guide
Password Reset Tips for Administrators 11
■ When an administrator (or any user with the necessary permission) creates a Customer record in
NetSuite and assigns a user a customer center role.
■ Visitors to your website can register an email address and create a password. This action creates Lead
record in your NetSuite account. Lead and Prospect records can be converted into Customer records.
See Automatic Reset of Customer Passwords for more information.
■ The website customer has not logged in within the previous three years.
■ It has been more than 90 days since the customer registered a login name and created a password,
and the customer never logged in again.
■ The website customer has not logged in within 30 days after their password was changed.
The customer, lead, or prospect record is retained in your NetSuite account. Only the existing password is
removed from the record. Users whose passwords have been reset can still attempt to log in. These users
will receive an error message that their password has expired.
Authentication Guide
Password Changes Are Logged in System Notes on Entity Records 12
Requests to change a password are logged on the System Notes subtab of an entity record. Changes are
logged no matter who or what initiates the request. System notes capture successful changes requested
through the UI, web services, or RESTlets. Administrators can view the password change information in
the system notes for an entity.
Changes are logged for these entity types in NetSuite: Employee, Contact, Customer, Partner, Prospect,
and Vendor records. System notes include information about who or what initiated the password change,
and when the change took place:
■ User (from the Change Password or Forgot Your Password links, or when the user changed the
password after it expired.)
■ Administrators (by manual assignment to set user passwords, or by sending the New User Access
Notification Email to let the user set the password. The Administrator can also initiate a password
reset with the User Access Reset Tool).
■ NetSuite Customer Support (using internal tools).
■ Automated processes.
For more information about system notes, see the help topic System Notes Overview.
The following table describes the values for the entries in the Context and Old Value columns.
UI ■ USER_CHANGE – The user changed the password by clicking Change Password on the Settings
portlet.
Authentication Guide
Password Changes Are Logged in System Notes on Entity Records 13
Script ■ SUITE_SCRIPT - The password was changed programmatically through the SuiteScript API
through the execution of a SuiteScript.
Web Services ■ WEB_SERVICES - The password was changed programmatically through the SuiteTalk API by a
SOAP web services call.
Other ■ GENERATED - The system generated a random password for the entity.
■ TS_SET - NetSuite Customer Support set the password.
■ TS_RESET - NetSuite Customer Support reset the password.
■ NEW_ADMIN - In rare cases, an account has no active users with an Administrator role. NetSuite
Customer Support can add the Administrator role to a user.
■ SYSTEM_TASK - A NetSuite system task set reset the password.
■ PROVISIONING - The password was set when the account was provisioned.
Note: As of 2018.2, long-abandoned passwords are automatically reset. Passwords that are
automatically reset are associated with website customers who meet either of the following
criteria:
■ The website customer has not logged in within the previous three years.
■ It has been more than 90 days since the customer registered a login name and created a
password, and the customer never logged in again.
■ The website customer has not logged in within 30 days after their password was changed.
The customer, lead, or prospect record is retained in your NetSuite account. Only the existing password is
removed from the record. Users whose passwords have been reset can still attempt to log in. These users
will receive an error message that their password has expired.
Authentication Guide
Session Management in NetSuite 14
User Interface (UI) ■ Idle session timeout: See User Interface (UI) Sessions for more information about UI
default is 180 minutes session management and timeout values.
■ Absolute session
timeout: 12 hours
SOAP web services ■ Idle session timeout: ■ Your integrations should use sessionless protocols based on
20 minutes request level credentials, such as Token-based Authentication
■ Absolute session (TBA). See Token-based Authentication (TBA) for more
information. See also Authentication for SOAP Web Services.
timeout: 60 minutes
■ If your SOAP web services integrations use sessions, you
■ Operation session
must ensure that your SOAP calls are able to handle session
timeout: 15 minutes.
timeouts and reconnection. For more information, see the
help topic Session Management for SOAP Web Services.
■ If an operation takes more than 15 minutes to complete,
consider using asynchronous calls to complete the operation.
SuiteAnalytics ■ Idle session timeout: After 90 minutes of inactivity, SuiteAnalytics Connect sessions
Connect 90 minutes automatically time out. For more information, see the help topic
New Connections.
Web Stores (hosted ■ Idle session timeout: After 20 minutes of inactivity in a NetSuite-hosted web store, the
by NetSuite) 20 minutes user is logged out and becomes an anonymous shopper. There is
no automatic relogin to the web store.
Authentication Guide
Types of NetSuite Sessions 15
■ By default, the idle session timeout value is 180 minutes (3 hours). An administrator can configure the
Idle Session Timeout in Minutes value for an account on the General Preferences page. Go to Setup
> Company > Preferences > General Preferences. Valid values range from 15 minutes to 720 minutes
(12 hours).
■ For users logged in with a role that has permission to view unencrypted credit card data, idle session
timeout occurs after 15 minutes of inactivity. This restriction is in compliance with section 8.1.8 of
the Payment Card Industry Data Security Standard (PCI DSS) Requirements and Security Assessment
Procedures, version 3.2. Click here to view a PDF of this document from the PCI library.
■ The default value of 12 hours for absolute session timeout is aligned with the National Institute
of Standards and Technology (NIST) Digital Identity Guidelines for Authentication and Lifecycle
Management. Click here to view Section 4.2.3, Reauthentication, in the NIST guidelines.
■ Users are shown a warning with a 60-second countdown before an idle session timeout occurs. The
user can click a Keep Session Active button to resume the session.
■ Session management across multiple tabs has been synchronized. When a user logs in to an account,
all open tabs associated with that account are simultaneously unlocked. When a user logs out of an
account, all open tabs associated with that account are locked.
■ For users who often switch between roles or different companies and leave multiple browser tabs
open from previous sessions, the tabs of stale sessions are shown as inactive. When a user changes
roles, sessions from previous roles are invalidated, and those browser tabs are locked.
■ Occasionally, users might notice near the bottom right of the UI. For more information, see The
Offline Notification in the UI.
This procedure describes accessing a sandbox account, but also applies to accessing other account types
(Release Preview or development accounts, for example).
Authentication Guide
Simultaneous Access to More than One NetSuite Account Type 16
The following list contains things you can try to determine the source of the problem.
■ Open a new tab in your browser and attempt to open another website. If you cannot access another
website, check your ethernet or wireless connection. Contact your account administrator or network
administrator if you cannot access any websites.
■ If your connection to the internet appears to be working, in a new tab in your browser, open another
page in NetSuite. If that is successful, return to the tab where you were working in NetSuite. Save your
work. If the save is successful, continue working in NetSuite.
■ If you are not able to save your work in NetSuite, but other websites are working well, there might be a
problem with NetSuite.
□ Ask your coworkers if they also see the Offline popup in NetSuite.
Authentication Guide
The Offline Notification in the UI 17
□ Go to the NetSuite Status page at https://status.netsuite.com to see if there have been any
problems reported.
■ Contact your account administrator or network administrator if you continue to experience problems
with your connection to NetSuite. They might need to investigate your company network, or create a
case with Customer Support. Take note of the specific NetSuite pages or forms you are using when
you see the Offline notice appear. Also note the tasks you are performing when you see the Offline
notification.
Authentication Guide
NetSuite Login Pages 18
Note: You can also create a custom login page for your users with Customer Center roles.
See Creating Custom Pages for Login to Your NetSuite Account for more information.
Each type of login page displays a forgot your password link. Users can click the link, and an email is sent
to the user’s email address with instructions for resetting a forgotten password.
A separate login page for Customer Center roles is required. You can use the system-provided Customer
Center login page for this purpose, or you can create your own custom login page, or pages.
Authentication Guide
Creating Custom Pages for Login to Your NetSuite Account 19
Note: In 2017.2, Administrators can specify that their custom Customer Center login page be
served instead of the default Customer Center login page. If you have a custom login page for
your Customer Center, ensure it has been uploaded to your NetSuite File Cabinet. Then, go to
Setup > Company > Company Preferences > General Preferences and scroll down to the Customer
Center Login Page field. Select the filename for your Customer Center login page.
Your custom login page, and any images displayed on it, must be uploaded to the images folder in the
File Cabinet at Documents > Files > Images. Also, you must use the secure URL displayed on the file
record in any tags you use to display content on your login page.
If you decide to create a custom login page (for Customer Center roles or for non-Customer Center roles,
or for both types of roles) the login page must be hosted in the NetSuite File Cabinet. You can then
display a link to the custom login page on a different page on your website.
Important: Security best practices do not allow presenting login fields to your NetSuite
account in an iFrame on your web page. The following approved procedure details how to provide
login access to your NetSuite account.
To locate your account ID, go to Setup > Company > Setup Tasks > Company Information. The account ID
field is located near the bottom of the right column.
1. Create a custom login page in HTML, using the code below to display the NetSuite account login
fields. Save the HTML file to your hard drive.
■ If you are creating a custom login page for non-Customer Center roles, you could, for example,
name the file NSlogin.html. You do not have to modify the code shown below if you are creating
a non-Customer Center login page.
■ If you are creating a login page for Customer Center roles, you could name the file, for example,
NSprivatelogin.html. You must modify two lines in the sample. In each line you modify, replace
the variable <ACCOUNT_ID> with your account ID.
□ Modify the first line (the post action link) as shown:
<form method="post" action="/app/login/secure/privatelogin.nl">
□ Modify the href line for the Forgot your password link as shown:
<href="/app/login/preparepwdreset.nl?private=t">
Note: The following code only represents the basic required fields for login to your
NetSuite account. You can add content to this file, but you must use a secure URL to refer to
any additional files.
<!--The post action link below is for a non-Customer Center login page-->
<form method="post" action="app/login/secure/enterpriselogin.nl">
<!--For a Customer Center login page, modify the post action link as specified in step 1.-->
<table border="0" cellspacing="0" cellpadding="3">
Authentication Guide
Creating Custom Pages for Login to Your NetSuite Account 20
<tr>
<td>
Email address:<input name="email" size="30">
</td>
</tr>
<tr>
<td>
Password:<input name="password" size="30" type="password">
</td>
</tr>
<tr>
<td>
<!--The href link below is for a non-Customer Center login page-->
<a href="/app/login/preparepwdreset.nl">Forgot your password?</a>
<!--For Customer Center login page, modify the href link as specified in step 1.-->
</td>
</tr>
<tr>
<td>
<input type="submit" name="submitter" value="Login" >
</td>
</tr>
</table>
</form>
2. Go to the Images folder in the NetSuite File Cabinet (Documents > Files > Images).
3. Click Add File, and then select the appropriate HTML file for the custom login page that you
created in step 1. Ensure that the Available Without Login box is selected.
4. Click Open. The HTML file for your custom login page is uploaded to the File Cabinet. You can
also add any additional files you want to use for content on your custom login page to this folder.
Ensure that the Available Without Login box is selected for these files.
5. Determine the secure URL for your custom login page. You will use the secure URL later to display
the link to your custom login page.
a. Go to the Images folder in the NetSuite File Cabinet (Documents > Files > Images).
b. Click Edit next to the HTML file for your custom login page.
c. Copy the NetSuite URL that starts with https://<accountID>.app.... You will use this URL to
create a link to your login page.
6. Reference your custom login page from your website. You can now link to your custom login page
from any external source by adding an href that uses the secure URL you copied in step 5.c.
For example:
Do not copy the example! Use the URL you copied in step 5.c. in your href.
Important: The HTML file for the custom login page you created in step 1 must be
hosted in the NetSuite File Cabinet. The external source hosting the link does not have to
be in the NetSuite File Cabinet.
Security policies and contractual agreements prohibit displaying a NetSuite login page in an iFrame. For
more information, see NetSuite Login Pages and iFrame Prohibition.
Authentication Guide
Customizing Login and Logout Behavior 21
1. Add a redirect hidden field to the login form in your hosted HTML page, for example:
2. Follow the steps in the procedure in the section Creating a Custom Login Page.
Note: To find the role ID, go to Setup > Users/Roles > User Management > Manage Roles, and
click the role name link. The role ID is visible in the role page URL. See the following example:
https://xyz.app.netsuite.com/app/setup/role.nl?id=1047
1. Add a role redirect hidden field to the login form in your hosted HTML page, for example:
2. Follow the steps in the procedure in the section Creating a Custom Login Page.
1. Add an error redirect hidden field to the login form in your hosted HTML page, for example:
2. Create a separate version of your HTML login page that includes the error message, or implement
conditional logic in your custom HTML login page.
3. Follow the steps in the procedure in the section Creating a Custom Login Page.
Authentication Guide
Customizing Login and Logout Behavior 22
■ You logged in from the system domain for the first time, and there is no browser history .
■ You logged in to a new account for the first time. For example, you gained access to a new production
account.
Note: This version of the Choose Role page is not an error page. This page lets you explicitly
choose a role or an account. The page displays because the system was not able to determine
your role or account from previous NetSuite usage.
As part of a continuing commitment to provide the most secure environment possible, since January
2015, we have been enforcing the prohibition against the use of iFrames on the following login pages:
■ /pages/customerlogin.jsp
For example: https://system.netsuite.com/pages/customerlogin.jsp
■ /pages/login.jsp
For example: https://system.netsuite.com/pages/login.jsp
Authentication Guide
NetSuite Login Pages and iFrame Prohibition 23
This prohibition is intended to protect against what is known as a clickjacking attack. For more
information on defending against this vulnerability, visit the OWASP website to review the Clickjacking
Defense Cheat Sheet. This enforcement change is in accordance with best practices outlined in RFC7034 -
HTTP Header Field X-Frame-Options.
To allow logins through NetSuite, you must create a login page hosted on the NetSuite secure server and
display a link to this login page on a different page.
See Creating Custom Pages for Login to Your NetSuite Account for more information.
Authentication Guide
Enabling and Creating IP Address Rules 24
Note: To further secure the user login process, NetSuite two-factor authentication is the
preferred alternative to restricting access by IP address. For more information, see Two-Factor
Authentication (2FA).
Warning: IP addresses were designed primarily to serve host identification and addressing,
thus they cannot fully serve as a reliable second factor for user authentication. Consider the
following precautions, but be advised that two-factor authentication is strongly recommended.
■ Only public IPv4 addresses can be used. Private IPv4 addresses cannot be used outside of your private
network.
■ IPv6 addresses are not supported.
■ Make sure that you are the only owner of the public IPv4 address and that it is not shared among
multiple ISP clients.
With the increasing number of network devices, it is difficult to determine the IPv4 address of the
client reliably. Increased scarcity of IPv4 addresses is leading ISPs to use Carrier-Grade NAT (CGN),
Large-Scale NAT (LSN), and shorter Dynamic Host Configuration Protocol (DHCP) lease times. The
client IPv4 address is not usually designated to one client, nor is it static.
■ Any IP packet can be spoofed and the source-address modified or crafted.
■ Any IP address being rented to you cannot be treated as a reliable authentication factor.
New users with roles that have IP address restrictions enabled are prompted to set up security questions.
However, be aware that when you apply IP address restrictions, users are not prompted to answer
security questions when logging in to NetSuite or when changing roles. These IP address-restricted users
are only asked to answer their security questions if they forget their passwords. See the help topic Setting
Up Security Questions for more information.
Inbound single sign-on access to NetSuite respects IP address restriction rules. SOAP web services and
SAML Single Sign-on also respect IP Address restriction rules.
Warning: SuiteAnalytics Connect access to NetSuite does not respect IP address restriction
rules. Users may be able to access NetSuite data through SuiteAnalytics Connect from IP
addresses that they cannot use to access the NetSuite application directly.
Two-factor authentication is the preferred alternative to restricting access by IP address. For more
information, see Two-Factor Authentication (2FA). However, if you still wish to restrict access to your
NetSuite account by employing IP address rules, see the following sections:
Authentication Guide
Enable the IP Address Rules Feature 25
Important: Enabling the IP Address Rules feature does not retroactively apply IP address
restrictions to preexisting customized roles.
Note: IP address rules may prevent users from accessing web queries of NetSuite data. For
example, this issue occurs when a user with an IP address rule creates a web query and sends it to
other users who are logging in from different IP addresses.
Warning: Be sure that you have entered the correct IP addresses before you log out so
that you and your employees can log back in.
Important: You can enter up to 4000 characters. Use shorter forms of notation to
enter addresses (such as 123.45.67.80-99 or 123.45.67.80/24 in the following examples) if
necessary.
Authentication Guide
Create Company IP Address Rules 26
Note: A netmask defines which bits of the IP address are valid, the example means
"use the first three segments (255.255.255), but not the fourth segment (0)".
Note: The “24” indicates the number of bits from beginning to use in the validation –
the same IP addresses are valid as in the previous example (255 means 8 bits).
Warning: Think carefully when using this type of notation. The mask is a binary
number. For example, the IP address and mask 12.34.56.78/12.34.56.78 does not
indicate only one IP address is allowed. The IP address 140.34.56.78 matches the mask
in this example. There are more IP addresses that match the mask than are immediately
obvious.
Now, when you or other employees log in to NetSuite, if at least one rule is defined, the IP address of
the computer that is being used must match the rule(s) defined. If the computer does not match the IP
address rule(s) defined, login fails and a message is displayed that login is not allowed from the current IP
address.
If this employee has another role with IP address restrictions, the employee can only access that role from
the addresses listed on the employee record or the addresses listed at Setup > Company > Company
Information when the Inherit IP Rules from Company box is checked.
To allow an employee access only to specific machines, you can edit the employee’s record and enter one
IP address for each computer that can be used to access NetSuite.
Employees whose records were created before the IP Address Rules feature was enabled inherit the rules
you set at Setup > Company > Company Information by default.
Authentication Guide
Create Individual IP Address Rules 27
If you check this box and enter addresses in the IP Address Restriction field, this employee will
have access to both the addresses listed at Setup > Company > Company Information and the
addresses you list on this record.
5. To give this employee access to use specific machines, clear the Inherit IP Rules from Company
box, and list the IP addresses in the IP Address Restriction field.
Note: Enter valid IP addresses (in dotted decimal notation) from which you want this
employee to access your account. Each of the numbers in the four segments (the numbers
between the dots) must be between 0 and 255.
Important: You can enter up to 4000 characters. Use shorter forms of notation to
enter addresses (such as 123.45.67.80-99 or 123.45.67.80/24 in the following examples) if
necessary.
Note: A netmask defines which bits of the IP address are valid, the example means
"use the first three segments (255.255.255), but not the fourth segment (0)"
Note: The “24” indicates the number of bits from beginning to use in the validation –
the same IP addresses are valid as in the previous example (255 means 8 bits).
Warning: Think carefully when using this type of notation. The mask is a binary
number. For example, the IP address and mask 12.34.56.78/12.34.56.78 does not
indicate only one IP address is allowed. The IP address 140.34.56.78 matches the mask
in this example. There are more IP addresses that match the mask than are immediately
obvious.
You can make exceptions to your IP address rules by customizing roles. By default, all roles are restricted
by the IP address rules you set at Setup > Company > Company Information and on employee records.
Authentication Guide
Create Roles without IP Address Restrictions 28
You can customize roles, however, to create roles that are not restricted by these rules. This way, your
employees can access certain roles from anywhere and restricted roles from only the machines you
specify.
Now, when assigning roles on the Access tab of employee records, you can assign this new custom role
without IP address restriction. This employee can access the custom role from any computer, regardless
of the IP address rules set on the employee record or at Setup > Company > Company Information.
Authentication Guide
Token-based Authentication (TBA) 29
The TBA feature was built for integrations. Of all the inbound single sign-on features available for use
in NetSuite, TBA and OAuth 2.0 are the only mechanisms mature enough to use with web services and
RESTlets.
Note: OAuth 2.0 cannot be used with SOAP web services. For more information, see OAuth 2.0.
In your integrations, you might need to use certain functions that require an Administrator role. Two–
Factor Authentication (2FA) for Administrator roles are enforced in all accounts. You should transition
integrations that require an Administrator role to use TBA rather than user credentials. The Three-Step
TBA Authorization Flow should be used for all new integrations that are capable of opening a browser
and handling a callback URL. Developers of existing integrations currently using the issuetoken endpoint
should consider migrating the integration to the TBA authorization flow.
Password rotation policies in the account do not apply to tokens, making password management
unnecessary for your RESTlet and web services integrations. Token-based authentication allows
integrations to comply with any authentication policy that is deployed in a NetSuite account for UI
login, such as SAML Single Sign-on, OpenID Connect (OIDC), Inbound Single Sign-on, and Two-Factor
Authentication. You can use Two-Factor Authentication (2FA) roles and roles with SAML Single Sign-on
permissions with TBA.
Note: Tokens created using the Token-based Authentication feature in your NetSuite production
account are not copied to your Release Preview or to your sandbox accounts. To test this feature
in Release Preview or in a sandbox, you must create new tokens in that account. Each time the
sandbox is refreshed, you must create new tokens in the sandbox.
Authentication Guide
Token-based Authentication (TBA) Tasks for Administrators 30
Click the links in the following steps for detailed instructions for each task.
Note: Tokens created in your production account are not copied to your sandbox during a
refresh. To test token-based authentication in your sandbox, you must create tokens in the
sandbox account. Each time your sandbox is refreshed, you will need to create new tokens in the
sandbox.
Note: Enabling both the Client SuiteScript and Server SuiteScript features is required to
use RESTlets with token-based authentication.
4. In the Manage Authentication section, check the Token-based Authentication box. Click I
Agree on the SuiteCloud Terms of Service page.
5. Click Save.
Authentication Guide
Token-based Authentication (TBA) Tasks for Administrators 31
Note: The Manage Access Tokens link becomes available in the Settings portlet for users
with Administrator role, or users with a role that has been assigned the Manage Access
Tokens permission. However, before users can create access tokens, you must set up roles,
assign roles to users, and create integration records for applications.
■ You must set up TBA roles. See Set Up Token-based Authentication Roles. See also Token-based
Authentication (TBA) Permissions.
■ Administrators (or users assigned the Full level of the Setup Type Integration Application permission)
can create applications for use with TBA. See Create Integration Records for Applications to Use TBA.
For more detailed information, see the help topic Creating an Integration Record.
If desired, an administrator can modify existing roles to add token-based authentication permissions,
then assign users to those roles as needed. If you need more information about creating or customizing
roles, see:
Authentication Guide
Token-based Authentication (TBA) Tasks for Administrators 32
To add permissions to a role, go to Setup > Users/Roles > User Management > Manage Roles. Select a
role to customize. On the Permission tab, Setup subtab, choose the permission from the list and click Add.
Note: A user assigned the User Access Tokens permission does not also need the Log in using
Access Tokens permission.
You must assign TBA roles to users. See Assign Users to Token-based Authentication Roles.
You must set up applications for token-based authentication. See Create Integration Records for
Applications to Use TBA.
■ For more information about the Integration record, see the help topic Integration Management.
■ For more information about using token-based authentication with SOAP web services, see the help
topic Token-Based Authentication Details.
The following procedure briefly describes completing an Integration record. You should create a separate
integration record for each application.
Authentication Guide
Token-based Authentication (TBA) Tasks for Administrators 33
■ For accessing SOAP web services, both the Token-based Authentication (TBA) and the User
Credentials boxes can be checked.
■ For accessing REST web services, both the Token-based Authentication (TBA) and the OAuth 2.0
boxes can be checked.
■ For accessing RESTlets, the Token-based Authentication (TBA), the OAuth 2.0, and the User
Credentials boxes can be checked.
Token-based Authentication ■ This box must be checked to enable use of either the TBA.
(TBA) Authorization Flow or the Issue Token Endpoint.
■ When creating a new integration record, this box is checked by
default.
■ Allows creation of tokens through the UI only. Use the tokens
created to access RESTlets or SOAP and REST web services.
TBA: IssueToken Endpoint ■ Allows programmatic creation of tokens using the issuetoken
For more information, see The endpoint.
IssueToken Endpoint. ■ This box is checked for Integration records that existed before your
account was upgraded to 2019.2.
TBA: Authorization Flow ■ When creating a new integration record, this box is checked by
For more information, see The default.
Three-Step TBA Authorization ■ Allows creation of tokens using the TBA authorization flow.
Flow.
Callback URL ■ Enter the appropriate valid callback URL for your application.
■ The callback URL is validated when you save the integration record.
There are multiple different ways to use the asterisk (*) in a domain
name:
■ https://*.xyz.example.com/callback
Authentication Guide
Token-based Authentication (TBA) Tasks for Administrators 34
User Credentials
Important: New integrations should use another
method, such as TBA, rather than user credentials.
■ Clear this box to ensure this application will authenticate only using
tokens and not with user credentials.
7. Click Save.
The confirmation page displays the Client Credentials (Consumer Key and Consumer Secret) for
this application. The application developer will need this information.
Warning: The system displays the client ID and client secret only the first time you save
the integration record. In cases where an application previously used user credentials as an
authentication method, you must reset the consumer ID and consumer secret. Resetting
the consumer ID and client secret invalidates the previous consumer ID and client secret.
After these basic setup tasks are complete, you are almost ready to begin using token-based
authentication in your account. Users must create tokens. See Manage TBA Tokens in the NetSuite UI.
Important: Whether using The Three-Step TBA Authorization Flow, or calling The IssueToken
Endpoint, an Integration record is created and automatically installed in your account. The
Require Approval during Auto-Installation of Integration preference affects whether this
new record is automatically enabled. You can manage the preference at Setup > Integration >
SOAP Web Services Preferences. If the box for the Require Approval during Auto-Installation
of Integration preference is not checked (set to false) the State field on the new application is
automatically set to Enabled, and all requests are permitted. However, if the box is checked (set
to true) the State field on the new integration record is set to Waiting for Approval. In the latter
case, you must manually edit the record and set the State to Enabled. Until you set the state to
Enabled, all requests sent by that application are blocked.
To view a list of integration records in this account, go to Setup > Integration > Integration Mangement >
Manage Integrations.
Authentication Guide
Token-based Authentication (TBA) Tasks for Administrators 35
Note: If the integration record was created in another account and installed in your account
through a bundle, you cannot modify the Token-based Authentication field. For more details, see
the help topic Ownership of Integration Records.
1. Navigate to Setup > Integration > Managing Integrations, and open the appropriate integration
record for editing.
2. Check the Token-based Authentication box.
3. Click Save.
The system displays the Client Credentials (Consumer Key and Consumer Secret) on the screen.
Make a note of these values. You will need them to create an OAuth header.
Warning: For security reasons, the only time the Client Credentials (Consumer Key and
Consumer Secret) values are displayed is on the confirmation page. After you leave this page,
these values cannot be retrieved from the system. If you lose or forget these credentials, you must
reset them to obtain new values. Treat these values as you would a password. Never share these
credentials with unauthorized individuals and never send them by email.
■ Creating Tokens
There are various methods for creating tokens. In the NetSuite UI, the method employed depends on
the permission assigned to the role. For more information, see the following topics:
□ Access Token Management – Create and Assign a TBA Token
□ User Access Token – Create a TBA Token
■ Viewing, Editing, and Revoking Tokens See Viewing, Editing, Creating, and Revoking TBA Tokens to
open the Access Tokens list view page. Tokens can also be created by clicking New Access Token on
this page.
■ Search for tokens in your account. See Using the TBA Access Token Search Page.
Users can also create tokens without logging in to the NetSuite UI. For more information, see the
following topics:
Authentication Guide
Token-based Authentication (TBA) Tasks for Administrators 36
Note: Tokens created in your production account are not copied to your sandbox during a
refresh. To test token-based authentication in your sandbox, you must create tokens in the
sandbox account. Each time your sandbox is refreshed, you will need to create new tokens in the
sandbox.
Authentication Guide
Token-based Authentication (TBA) Tasks for Administrators 37
Warning: For security reasons, the only time the Token ID and Token Secret values are
displayed is on the confirmation page. After you leave this page, these values cannot be
retrieved from the system. If you lose or forget these credentials, you will need to create a
new token and obtain new values.
Treat these values as you would a password. Never share these credentials with
unauthorized individuals and never send them by email.
Note: Tokens created using the Token-based Authentication feature in your NetSuite production
account are not copied to your Release Preview or to your sandbox accounts. To test this feature
in Release Preview or in a sandbox, you must create new tokens in that account. Each time the
sandbox is refreshed, you must create new tokens in the sandbox.
The My Access Tokens page displays, listing all the tokens for the current user in the current role.
Authentication Guide
Token-based Authentication (TBA) Tasks for Administrators 38
Warning: For security reasons, the only time the Token ID and Token Secret values are
displayed is on the confirmation page. After you leave this page, theses values cannot be
retrieved from the system. If you lose or forget these credentials, you will need to create a
new token and obtain new values.
Treat these values as you would a password. Never share these credentials with
unauthorized individuals and never send them by email.
To view tokens:
1. Go to Setup > Users/Roles > User Management > Access Tokens
The Access Token page displays.
Authentication Guide
Token-based Authentication (TBA) Tasks for Administrators 39
Revoking a token makes it inactive forever, but does not remove the token from the system. The token is
still accessible for auditing purposes.
■ When a token is revoked, it cannot be edited, and will display with an Inactive status in list views.
■ When the Inactive box is checked for a token, the token will display as Inactive in list views, but the
token can still be edited. To make the token active again, click Edit, clear the Inactive box, and click
Save.
■ When an application used for token-based authentication is deleted, all tokens associated with that
application are revoked.
■ When an administrator removes roles from an entity (an employee, a vendor, a partner, a customer, or
a contact) the tokens are still active in the system. These active tokens cannot be used by the entity for
log in to NetSuite (unless the administrator adds the roles back to the entity).
■ When an administrator deletes an entity, (an employee, a vendor, a partner, a customer, or a contact)
the associated tokens are deleted.
Authentication Guide
Token-based Authentication (TBA) Tasks for Administrators 40
■ Running Searches
■ Saved Searches
Authentication Guide
Token-based Authentication (TBA) for Integration Application Developers 41
The redirection-based authorization flow consists of three steps. Click the links below for more detailed
information on each step.
With the TBA Authorization Flow feature, integration developers begin the process to grant access tokens
in their application. The request token URL generates an intermediate (unauthorized) request token. A
user, for whom an access token is to be granted, authorizes the request token and explicitly consents
that the application can access NetSuite data. If this step succeeds, the application exchanges the request
token for an access token to be used while calling a RESTlet or a web service.
If you decide to use TBA for new integrations, you should use the TBA Authorization Flow. Developers of
existing integrations currently using the issuetoken endpoint should consider migrating the integration to
the TBA authorization flow.
The Administrator must create integration records for each application. See Create Integration Records
for Applications to Use TBA. The administrator must configure the callback URL on the integration record.
The underlying application must have the ability to open a browser, and must be able to handle callback
URLs.
Note: If the application does not have the ability to open a browser and handle callback URLs,
developers should continue to use the issuetoken endpoint. If this is the case for your application,
see The IssueToken Endpoint and Issue Token and Revoke Token REST Services for Token-based
Authentication. A tokeninfo endpoint is also available to provide information about a user based
on the access token. See Calling a token endpoint to obtain user information based on a token.
https://<accountID>.restlets.api.netsuite.com/rest/requesttoken
Note: You should use the account-specific domain URL as shown. However, as of 2020.1, if you
do not know the account ID, requests can be sent to the system.netsuite.com domain.
oauth_consumer_key ■ Identifies the client. (The service attempting to access the resource.)
■ The value of the consumer key is provided when the Integration record is
created.
Authentication Guide
Token-based Authentication (TBA) for Integration Application Developers 42
oauth_timestamp ■ Number of seconds passed since 1st January 1970 00:00:00 GMT
■ Must be a positive integer
■ Should be equal to or greater than any timestamp passed in previous
requests
oauth_nonce ■ Generated random string. Nonce must be at least six characters long. A
nonce length of 20 characters is recommended.
■ Must be unique for all requests with the same timestamp.
oauth_version ■ Optional.
■ If present, value must be 1.0.
role ■ Optional.
■ Indicates the role for which to grant the access token.
state ■ Optional.
■ Maximum length is 512 characters. Valid alpha-numeric characters are
upper- and lowercase letters (a-z, A-Z), and numbers 0–9.
Refer to RFC 6749, Section 4.1.1 for more information about the state
parameter.
Note: Refer to RFC 5849 if you need more information about the parameters oauth_timestamp,
oauth_nonce, and oauth_version.
Authentication Guide
Token-based Authentication (TBA) for Integration Application Developers 43
oauth_token_secret The corresponding Token Secret, to be used for signature creation in Step 3 of the
flow.
role The role parameter is present in the response only if configured in the request.
state The state parameter is present in the response only if configured in the request. The
value of the parameter must match the value in the request.
When you have the HTTP response, proceed to Step 2: Authorize the Request Token.
https://<accountID>.app.netsuite.com/app/login/secure/authorizetoken.nl?
oauth_token=da9eba68ac7c1995bcdcb5f035f5b64df79dbc6e4db305064aa63eaa7bf35111
Note: You should use the account-specific domain URL as shown. However, as of 2020.1, if you
do not know the account ID, requests can be sent to the system.netsuite.com domain.
■ The user is authenticated. If there is no active NetSuite session, the user is first redirected to the
NetSuite login form. If the GET request points to an account-specific domain, for an account with SAML
SSO or OIDC enabled, the user can be redirected to a third party application.
■ After successful authentication, a consent page displays. The user can click Allow to give permission
for the generation of the access token, which occurs in Step 3.
Note: If the user clicks Deny, the authorization flow ends. The application should display
an error message to the user. Clicking Deny is one reason for an empty oauth_verifier
parameter in the response to Step 2.
■ If the authenticated user is logged in to an inappropriate role, the user can choose the appropriate
role by selecting Change Role on the Consent page.
https://my.example.com/TBA/?callbackRequest&oauth_token=da9eba68ac7c1995bcdcb5f035f5b64df79dbc6e4db305064aa63eaa7bf35111&oauth_veri
fier=111e630079c0222cf59cf18410e9939c848507457d7010003db01e63fa42abcd&company=1234567&role=3&entity=38
Parameter Description
Authentication Guide
Token-based Authentication (TBA) for Integration Application Developers 44
Parameter Description
role Indicates the role for which to grant the access token.
state If the optional state parameter value does not match the value originally passed to NetSuite, the
client should not trust the request or redirect.
When the application has handled the callback URL, proceed to Step 3: Exchange the Request Token for
an Access Token.
https://<accountID>.restlets.api.netsuite.com/rest/accesstoken
oauth_consumer_key The same verified oauth_consumer_key value that was used in Step 1, from
the Integration record.
oauth_signature Similar to the procedure in Step 1, but also including the Token Secret
which was returned in Step 1. For more information on constructing
a signature, see Constructing the Signature for Step 3 of the TBA
Authorization Flow. See also Specifications for Signature Construction for
the TBA Authorization Flow.
Authentication Guide
Token-based Authentication (TBA) for Integration Application Developers 45
Important: Whether using The Three-Step TBA Authorization Flow, or calling The IssueToken
Endpoint, an Integration record is created and automatically installed in your account. The
Require Approval during Auto-Installation of Integration preference affects whether this
new record is automatically enabled. You can manage the preference at Setup > Integration >
SOAP Web Services Preferences. If the box for the Require Approval during Auto-Installation
of Integration preference is not checked (set to false) the State field on the new application is
automatically set to Enabled, and all requests are permitted. However, if the box is checked (set
to true) the State field on the new integration record is set to Waiting for Approval. In the latter
case, you must manually edit the record and set the State to Enabled. Until you set the state to
Enabled, all requests sent by that application are blocked.
■ oauth_token A granted Access Token and token secret to be used for proper Authorization header
compilation to call a RESTlet or a web service.
■ oauth_token_secret
For more information, see The Authorization Headers.
If the Access Token is generated successfully, the Integration record is automatically installed for the
requested account. For more information, see the help topic Auto-Installation of Integration Records.
Encoding
For more information about encoding, refer to Section 3.6 of RFC 5849:
■ For Text values, refer to RFC 3629. Text values must be encoded as UTF-8 octets if they are not
already encoded.
■ Values are escaped using the Percent-Encoding (%XX) mechanism:
□ Do not encode characters from the unreserved character set. Refer to Section 2.3 of RFC 3986 for
documentation of the unreserved character set.
□ All other characters must be encoded.
□ Two hexadecimal characters used to represent encoded characters must be uppercase.
Authentication Guide
Token-based Authentication (TBA) for Integration Application Developers 46
Important: A blank symbol is encoded as %20 and not as the plus (+) symbol. Be aware
that some framework functions may return undesired results.
■ The parameters that are used include: (refer to Request Parameters, Section 3.4.1.3 of RFC 5849):
□ parameters from the Authorization header (excluding “realm” and “oauth_signature”)
□ parameters from the HTTP request entity body
□ parameters from the query part of the request URL
■ Encoding of parameter names and values occurs using the algorithm described in Encoding.
■ Sorting by name is performed using ascending byte value ordering. If names are identical, sorting is
done by values.
■ Names and values form pairs separated by the equal (=) symbol, even when there is no value.
■ Pairs are concatenated in the defined order by the ampersand (&) symbol.
Where:
Important: The token secret value is only used in Step 3. The token secret value is empty in
Step 1.
The result digest octet string is used as the resulting oauth_signature after:
■ being Base64-encoded. (For more information about Base64 Content-Transfer-Encoding, see Section
6.8 of RFC 2045.
■ being encoded using the algorithm described in Encoding.
Authentication Guide
Token-based Authentication (TBA) for Integration Application Developers 47
The following values are used for the examples in this section:
Parameter Value
Company ID 1234567
Role ID 45678
Note: For purposes of this example, the values of Consumer Key and Consumer
Secret are identical.
Nonce bUvpxBX93OWo0FLswq5M
Timestamp 1575998103
<base-string> = <http-request-method>&<base-string-uri>&<normalized-request-parameters>
Where:
Component Description
http-request-method POST
base-string-uri https://1234567.restlets.api.netsuite.com/rest/requesttoken
■ oauth_callback
■ oauth_consumer_key
■ oauth_nonce
■ oauth_signature_method
■ oauth_timestamp
■ oauth_version
■ role
POST&https%3A%2F%2Ffanyv88.com%3A443%2Fhttps%2F1234567.restlets.api.netsuite.com%2Frest%2Frequesttoken&oauth_callback%3Dhttps%253A%252F%252Fmy.ex
ample.com%252FTBA%252F%253FcallbackRequest%26oauth_consumer_key%3D60712990bc09623786e7047c226bcb3f86d49dca0b04efc21001d
Authentication Guide
Token-based Authentication (TBA) for Integration Application Developers 48
c76d97a81f5%26oauth_nonce%3DbUvpxBX93OWo0FLswq5M%26oauth_signature_method%3DHMAC-SHA256%26oauth_timestamp%3D1575998103%26oauth_ver
sion%3D1.0%26role%3D45678
The key for generating the signature consists of the consumer secret.
60712990bc09623786e7047c226bcb3f86d49dca0b04efc21001dc76d97a81f5&
After using the algorithm described in Generating the Signature for the TBA Authorization Flow you get
the following result:
7kgwwmiAylqeMdHjCBnIUUW%2BdrDrGCbZGBkuCt39J90%3D
Parameter Value
Company ID 1234567
Note: For purposes of this example, the values of Consumer Key and Consumer
Secret are identical.
Note: For purposes of this example, the values of Token Key and Token Secret are
identical.
Verifier 3eff1ae4de6f924014b88e489a41e88da8ed1ba8bd5ad7684a71579d7e97f4ee
Nonce wjRgXQPWhYtKl0A7bO8Z
Timestamp 1576079512
Authentication Guide
Token-based Authentication (TBA) for Integration Application Developers 49
<base-string> = <http-request-method>&<base-string-uri>&<normalized-request-parameters>
Where:
Component Description
http-request-method POST
base-string-uri https://1234567.restlets.api.netsuite.com/rest/accesstoken
■ oauth_consumer_key
■ oauth_token
■ oauth_signature_method
■ oauth_timestamp
■ oauth_nonce
■ oauth_version
■ oauth_verifier
POST&https%3A%2F%2Ffanyv88.com%3A443%2Fhttps%2F1234567.restlets.api.netsuite.com%2Frest%2Faccesstoken&oauth_con
sumer_key%3D60712990bc09623786e7047c226bcb3f86d49dca0b04efc21001dc76d97a81f5%26oauth_nonce%3DwjRgXQPWhYtKl0A7bO8Z%26oauth_sig
nature_method%3DHMAC-SHA256%26oauth_timestamp%3D1576079512%26oauth_token%3D447d0cba5569a2d616e32a537110bc8c10ebcf42c
c1fa34d6f76d08531abc179%26oauth_verifier%3D3eff1ae4de6f924014b88e489a41e88da8ed1ba8bd5ad7684a71579d7e97f4ee%26oauth_version%3D1.0
Important: Be aware that the token secret is present in Step 3, whereas it was omitted in Step
1.
60712990bc09623786e7047c226bcb3f86d49dca0b04efc21001dc76d97a81f5&447d0cba5569a2d616e32a537110bc8c10ebcf42cc1fa34d6f76d08531abc179
After using the algorithm described in Generating the Signature for the TBA Authorization Flow you get
the following result:
BBzawyjesZyFrwBjUAJfBsPDDGUY2FRdp3k4NwGDAO0%3D
Authentication Guide
Token-based Authentication (TBA) for Integration Application Developers 50
If you decide to use TBA for new integrations, you should use the TBA Authorization Flow. Developers of
existing integrations currently using the issuetoken endpoint should consider migrating the integration to
the authorization flow. See The Three-Step TBA Authorization Flow for more information.
Important: Whether using The Three-Step TBA Authorization Flow, or calling The IssueToken
Endpoint, an Integration record is created and automatically installed in your account. The
Require Approval during Auto-Installation of Integration preference affects whether this
new record is automatically enabled. You can manage the preference at Setup > Integration >
SOAP Web Services Preferences. If the box for the Require Approval during Auto-Installation
of Integration preference is not checked (set to false) the State field on the new application is
automatically set to Enabled, and all requests are permitted. However, if the box is checked (set
to true) the State field on the new integration record is set to Waiting for Approval. In the latter
case, you must manually edit the record and set the State to Enabled. Until you set the state to
Enabled, all requests sent by that application are blocked.
■ Issue Token and Revoke Token REST Services for Token-based Authentication
■ Mandatory 2FA, the IssueToken Endpoint, and nlauth_otp
■ The NLAuth Authorization Header in TBA
To accommodate the requirement for mandatory 2FA for highly privileged roles, the issuetoken endpoint
was extended. The NLAuth authentication header includes an optional parameter, nlauth_otp. You can
use the nlauth_otp parameter to include a one-time password (OTP) in the NLAuth header. The OTP
is equivalent to the 2FA verification code provided by a user logging in to the NetSuite UI. Users can
generate the necessary codes using an authenticator app, such as Google Authenticator, Microsoft
Authenticator, or Okta Verify. The authentication application you choose must support OATH TOTP, the
IETF RFC 6238 standard. Go to https://tools.ietf.org/html/rfc6238 to review the standard.
Warning: If the authenticator app is on the same device you use to access the integrations,
it is not considered secure. Similarity to the 2FA verification code can only be maintained if the
authenticator and the integration are not on the same device.
An authenticator app is configured for and linked to a user’s email address. The verification code must be
synchronized to the email address used in the NLAuth header for the integration.
Note: An authenticator app must generate the verification code included in an NLAuth header.
Verification codes such as those supplied by an email, SMS message, voice call, or from a backup
code are not acceptable.
The one–time password (OTP) is a TOTP: a time-based one-time password. Time-based means that
the verification code must be generated at the time of need: when the request is sent and being
Authentication Guide
Token-based Authentication (TBA) for Integration Application Developers 51
authenticated. The verification code is valid for approximately a minute surrounding the time of
authentication. The validity window may vary depending on the implementation.
If the NLAuth authentication header does not include an OTP for a 2FA required role, the user receives an
error message that Two-Factor Authentication is required.
■ The code generator must store one secret key per user, that is, per email address. (When a user is
configuring 2FA settings in NetSuite, the secret key is the long string of characters shown next to the
QR code displayed on the Two-Factor Authentication setup page. If a user resets 2FA settings, the
secret key has a different value when 2FA is configured again.
■ If the time is not perfectly synchronized, plus or minus a few seconds should not cause a verification
code to be rejected.
■ OTP means one-time password. Each code can be used only a single time. OTPs cannot be reused. If
two integrations hit the issuetoken endpoint with the same verification code for the same user at the
same time (within 30 seconds) then the second integration will fail. To avoid this situation, the best
practice is to utilize different users and roles for multiple integrations. Otherwise, you must include
logic in your code that forces the client to wait 30 seconds and use the next available code
For more information on the NLAuth authentication header and the issuetoken endpoint, see Using User
Credentials for RESTlet Authentication. See also Issue Token and Revoke Token REST Services for Token-
based Authentication.
To construct an NLAuth authorization header, use the fields described in the following table.
Authentication Guide
Token-based Authentication (TBA) for Integration Application Developers 52
Important: Strings must be escaped using RFC 3986. If you do not escape characters in the
header, you may receive an INVALID_LOGIN_ATTEMPT error. For more information about percent
encoding, see https://tools.ietf.org/html/rfc5849#section-3.6.
Field Description
nlauth_email The email address with which the user logs in to NetSuite.
nlauth_otp The value of the one-time password (OTP) is the same as the value
of a two–factor authentication (2FA) verification code generated by
Important: This parameter can an authenticator app when a user is logging in to the NetSuite UI.
only be used with the issuetoken
endpoint.
Users also have the following options to obtain their own access tokens:
■ Users assigned a role that has the User Access Token permission can create, assign, and manage
tokens for the current user and current role. For more information, see User Access Token – Create a
TBA Token
■ An integration developer creates an application that requests user credentials and gives the user an
access token. For more information, see The IssueToken Endpoint.
■ An integration developer creates an application that uses the TBA authorization flow. At the end of the
flow, user gets an access token. For more information, see The Three-Step TBA Authorization Flow.
Note: Tokens created using the Token-based Authentication feature in your NetSuite production
account are not copied to your Release Preview or to your sandbox accounts. To test this feature
in Release Preview or in a sandbox, you must create new tokens in that account. Each time the
sandbox is refreshed, you must create new tokens in the sandbox.
Authentication Guide
Troubleshoot Token-based Authentication (TBA) 53
Note: Encoding used in TBA is percent encoding. All code examples in the sections listed above
use rawurlencoding, the PHP implementation of percent encoding. For more information, see the
specification https://tools.ietf.org/html/rfc5849#section-3.6.
For more information about defining Login Audit Trail searches, see the help topic Login Audit Trail
Overview.
Authentication Guide
Troubleshoot Token-based Authentication (TBA) 54
■ Error Messages for RESTlets, SOAP Web Services, and REST Web Services
■ Error Messages for the TBA Authorization Flow
Note: Tokens created using the Token-based Authentication feature in your NetSuite production
account are not copied to your Release Preview or to your sandbox accounts. To test this feature
in Release Preview or in a sandbox, you must create new tokens in that account. Each time the
sandbox is refreshed, you must create new tokens in the sandbox.
Error Messages for RESTlets, SOAP Web Services, and REST Web Services
See the following table for information about resolving error messages for RESTlets, SOAP web services,
and REST web services.
consumer_key_ consumer_key_ The application is in Blocked state Enable the application on the integration record.
refused refused on the integration record.
consumer_key_ consumer_key_ The appropriate integration record ■ Ensure the consumer key is correct.
unknown unknown could not be found.
■ If this error occurs with a currently enabled application,
you can attempt resetting the credentials (obtain new
credentials).
FeatureDisabled FeatureDisabled The Token-based Authentication Enable the feature. See Enable the Token-based
feature in NetSuite is not enabled. Authentication Feature.
MissingToken MissingToken The request is missing a required Verify that all required parameters are included in the
PassportRequired PassportRequired parameter. request.
Fields Fields
nonce_rejected N/A The nonce was not long enough. Nonce must be at least six characters long. A nonce length
of 20 characters is recommended.
nonce_used NonceUsed The combination of nonce and ■ Ensure you generate a unique nonce for every request.
timestamp has already been used
■ Do not send the same request more than one time.
by this user.
If you must perform the same operation, you must
generate a new TBA header for each subsequent
request.
Authentication Guide
Troubleshoot Token-based Authentication (TBA) 55
permission_denied permission_denied The entity or role is not usable. This error can have many causes.
InvalidSignature InvalidSignature The request was not signed See Generate a Signature for the correct method of
correctly. signing a request.
UnknownAlgorithm UnknownAlgorithm The algorithm used to create The most secure supported algorithm is HMAC-SHA256.
signature is not supported. You should use the HMAC-SHA256 algorithm.
temporary_locked temporary_locked The user is locked out of NetSuite. The user was locked out of NetSuite after six failed login
attempts. The user must wait 30 minutes to unlock access
to your account. Or, the user can ask their Administrator
or system administrator for a password reset. See User
Access Reset Tool.
token_rejected token_rejected The token could not be found. Ensure that the token:
■ Is correct.
■ Is active.
■ Is a token for the correct integration application.
VersionRejected N/A The request uses an invalid value The value for the OAuth version parameter must be 1.0.
for OAuth version parameter.
UnknownIntegration UnknownIntegration The appropriate integration record ■ If the integration record exists, verify
could not be found. the following:
□ Ensure the consumer key is
correct.
□ If this error occurs with a currently
enabled application, you can
Authentication Guide
Troubleshoot Token-based Authentication (TBA) 56
Important: This
action might break other
integrations using this
application. You must
update the credentials
in all integrations where
they are used.
N/A IntegrationBlocked The state of the integration record Enable the application on the integration
is Blocked. record.
AuthorizationFlowRequired AuthorizationFlow The integration application does Ensure that the TBA: Authorization Flow
Required not use the TBA authorization flow. box is checked in the corresponding
integration record. For more information,
see Create Integration Records for
Applications to Use TBA.
InvalidSignature InvalidSignature The signature is incorrect. See Generating the Signature for the
TBA Authorization Flow for the correct
method of signing a request. See also The
Signature for Web Services and RESTlets.
InvalidCallback <<--callback-URL- N/A The callback URL is not valid. On the integration record, verify the
specified-->> callback URL and correct the request as
needed.
MissingRequiredParameter MissingRequired The request is missing a required Verify that all required parameters
Parameter parameter. are included in the request. For more
information, see the following topics:
NonceRejected NonceRejected The nonce was not long enough. Nonce must be at least six characters
long. A nonce length of 20 characters is
recommended.
NonceUsed NonceUsed The combination of nonce and ■ Ensure you generate a unique nonce
timestamp has already been used for every request.
by this user.
Authentication Guide
Troubleshoot Token-based Authentication (TBA) 57
N/A TokenRejected The token could not be found. Ensure that the token:
■ Is correct.
■ Is active.
■ Is a token for the correct integration
application.
N/A EntityOrRoleDisabled The entity or role is not usable. This error can have many causes.
FeatureDisabled FeatureDisabled The Token-based Authentication Enable the feature. See Enable the Token-
feature in NetSuite is not enabled. based Authentication Feature.
UnknownAlgorithm UnknownAlgorithm Potential reasons for this error Potential resolutions include:
message include:
■ Only the HMAC-SHA256 algorithm is
■ The algorithm used (such as supported for the TBA authorization
HMAC-SHA1) is not supported flow
for the TBA authorization flow. ■ See Generating the Signature for the
■ The signature method is not TBA Authorization Flow for the correct
supported. method of signing a request.
VersionRejected VersionRejected The request uses an invalid value The value for the OAuth version
for OAuth version parameter. parameter must be 1.0.
N/A InvalidVerifier The value of the oauth_verifier Ensure that the value of the
parameter does not match the oauth_verifier parameter provided to
value provided in Step 2 of the TBA the Callback URL in the application is
flow. used during Step 3.
Note: The values defined in this section are the values used in The Authorization Headers and
The RESTlet Base String sections.
Generate a Signature
Some users have difficulty constructing a valid signature.
The following sections describes how to correctly create a signature and provides PHP examples for each
step.
Authentication Guide
Troubleshoot Token-based Authentication (TBA) 58
Note: All encoding in TBA is percent encoding. For more information about percent encoding,
go to (https://tools.ietf.org/html/rfc5849#section-3.6). The examples in this section use PHP
rawurlencode.
$url = 'https://<accountID>.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=6&deploy=1&customParam=someValue&test
Param=someOtherValue';
//or https://webservices.netsuite.com/services/NetSuitePort_2015_2 for webservices
$httpMethod = 'POST';
$tokenKey = '2b0ce516420110bcbd36b69e99196d1b7f6de3c6234c5afb799b73d87569f5cc';
$tokenSecret = 'c29a677df7d5439a458c063654187e3d678d73aca8e3c9d8bea1478a3eb0d295';
$consumerKey = 'ef40afdd8abaac111b13825dd5e5e2ddddb44f86d5a0dd6dcf38c20aae6b67e4';
$consumerSecret = 'd26ad321a4b2f23b0741c8d38392ce01c3e23e109df6c96eac6d099e9ab9e8b5';
$signatureMethod = 'HMAC-SHA256'; //or HMAC-SHA1
$nonce = 'fjaLirsIcCGVZWzBX0pg'; //substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0,
20);
$timestamp = '1508242306'; //time();
$version = '1.0';
$realm = '123456'; //scompid
Note: If you are constructing a signature for the TBA authorization flow, be aware of the
following:
■ The token and oauth_verifier parameters required for the base string are not shown in the
following examples. See The Three-Step TBA Authorization Flow for information about these
parameters.
■ Except for the realm parameter, all parameters shown in the table in Request Header
Parameters in the Authorization Header for Step 1 must be part of base string.
■ You can follow the RESTlets format as a guideline for constructing the base string, as RESTlets
also follows the OAuth 1.0 specification.
Authentication Guide
Troubleshoot Token-based Authentication (TBA) 59
For SOAP web services, the creation of the Base String creation is straightforward. Use percent encoding.
Parameters include: realm (accountID, also called scompid), consumer key, token key, nonce, and
timestamp, with the ampersand character (&) as the delimiter.
3829855&ef40afdd8abaac111b13825dd5e5e2ddddb44f86d5a0dd6dcf38c20aae6b67e4&2b0ce516420110bcbd36b69e99196d1b7f6de3c6234c5af
b799b73d87569f5cc&fjaLirsIcCGVZWzBX0pg&1508242306
RESTlets
This RESTlets example uses the oauth library. For more information, see https://tools.ietf.org/html/
rfc5849#section-3.4.1.
POST&https%3A%2F%2F<accountID>.restlets.api.netsuite.com%2Fapp%2Fsite%2Fhosting%2Frestlet.nl&customParam%3DsomeValue%26deploy
%3D1%26oauth_consumer_key%3Def40afdd8abaac111b13825dd5e5e2ddddb44f86d5a0dd6dcf38c20aae6b67e4%26oauth_nonce%3DfjaLirsIc
CGVZWzBX0pg%26oauth_signature_method%3DHMAC-SHA256%26oauth_timestamp%3D1508242306%26oauth_token%3D2b0ce516420110bcb
d36b69e99196d1b7f6de3c6234c5afb799b73d87569f5cc%26oauth_version%3D1.0%26script%3D6%26testParam%3DsomeOtherValue
Step 3: Signature
The signature is a base64 value of the HMAC-SHA, where the message is Base String and key is the key
from the previous step.
76wQrUWF8i3BwfAjrNnTxjFo+Ixj9YzYgsj+HVeGQyY=
7mpNx1RdQn4VLSyeEwCK7jFBjGQ0blzwDSMU9Kg5Rmg=
Authentication Guide
Troubleshoot Token-based Authentication (TBA) 60
RESTlet Header
Authentication Guide
Troubleshoot Token-based Authentication (TBA) 61
Note: POST parameters are used only with content type "application/x-www-form-urlencoded".
However, this content type is not allowed by RESTlets.
Authentication Guide
Troubleshoot Token-based Authentication (TBA) 62
//include url without parameters, schema and hostname must be lower case
if (strpos($url, '?')){
$baseUrl = substr($url, 0, strpos($url, '?'));
$getParams = substr($url, strpos($url, '?') + 1);
} else {
$baseUrl = $url;
$getParams = "";
}
$hostname = strtolower(substr($baseUrl, 0, strpos($baseUrl, '/', 10)));
$path = substr($baseUrl, strpos($baseUrl, '/', 10));
$baseUrl = $hostname . $path;
$baseString .= rawurlencode($baseUrl) .'&';
//all oauth and get params. First they are decoded, next alphabetically sorted, next each key and values is encoded and finally whole parameters are
encoded
$params = array();
$params['oauth_consumer_key'] = array($consumerKey);
$params['oauth_token'] = array($tokenKey);
$params['oauth_nonce'] = array($nonce);
$params['oauth_timestamp'] = array($timestamp);
$params['oauth_signature_method'] = array($signatureMethod);
$params['oauth_version'] = array($version);
Authentication Guide
Troubleshoot Token-based Authentication (TBA) 63
$paramString = "";
foreach ($params as $key => $valueArray){
//all values must be alphabetically sorted
sort($valueArray);
foreach ($valueArray as $value){
$paramString .= rawurlencode($key) . '='. rawurlencode($value) .'&';
}
}
$paramString = substr($paramString, 0, -1);
$baseString .= rawurlencode($paramString);
return $baseString;
}
See also:
Note: Web Services Only roles are only for access to NetSuite through web services. Roles with
the Web Services Only restriction will not work with RESTlets.
Authentication Guide
Token-based Authentication and RESTlets 64
Note: Tokens created using the Token-based Authentication feature in your NetSuite production
account are not copied to your Release Preview or to your sandbox accounts. To test this feature
in Release Preview or in a sandbox, you must create new tokens in that account. Each time the
sandbox is refreshed, you must create new tokens in the sandbox.
Follow the OAuth 1.0 specification to generate a token. For more information and an example, see Step 1:
Obtain An Unauthorized Request Token.
Token-based authentication removes the problems associated with password expiration from SOAP
web services authentication. Client applications can access web services using a token, significantly
reducing the risk of compromising user credentials. For more information, see the help topic Integration
Management.
Note: Tokens created using the Token-based Authentication feature in your NetSuite production
account are not copied to your Release Preview or to your sandbox accounts. To test this feature
in Release Preview or in a sandbox, you must create new tokens in that account. Each time the
sandbox is refreshed, you must create new tokens in the sandbox.
For guidance on adapting an integration to include TBA credentials and to see an example that includes
code snippets and SOAP headers, see the help topic Token-Based Authentication Details.
With TBA, you use the TokenPassport complex type to send credentials. The TokenPassport references
the TokenPassportSignature complex type, another important element in the token-based authentication
process. See the help topic TokenPassport Complex Type.
For more information about using token-based authentication with web services, see the following topics:
Authentication Guide
OAuth 2.0 65
OAuth 2.0
NetSuite supports OAuth 2.0, a robust authorization framework. This authorization framework enables
client applications to use a token to access NetSuite through REST web services and RESTlets. The
application accesses the protected resources on behalf of a user who gave an explicit permission for
the access. This method eliminates the need for RESTlets or REST web services integrations to store
user credentials. OAuth 2.0 can be used as an alternative to Token-based Authentication. It is more
straightforward to implement, because request signing is not required.
The OAuth 2.0 feature is for use with RESTlets and REST web services only. It is not supported for SOAP
web services.
See the following topics for more information about OAuth 2.0:
Important: Currently only confidential clients are supported for use with OAuth 2.0
Click the links in the following steps for detailed instructions for each task.
Authentication Guide
OAuth 2.0 Tasks for Administrators 66
Note: You must enable both the Client SuiteScript and Server SuiteScript features to use
OAuth 2.0 feature for RESTlets.
4. In the Manage Authentication section, check the OAuth 2.0 box. Click I Agree on the SuiteCloud
Terms of Service page.
5. Click Save.
Note: The Manage OAuth 2.0 Authorized Applications link becomes available in the
Settings portlet for users with a role that has been assigned Log in Using OAuth 2.0 Access
Token permission. Users can only list their own OAuth 2.0 authorized applications through
this link. Administrators and users with OAuth 2.0 Authorized Applications Management
permission can list all authorized applications in the account on Setup > Users/Roles >
OAuth 2.0 Authorized Applications.
■ You must set up OAuth 2.0 roles. See Add OAuth 2.0 Permissions to Roles. See also OAuth 2.0
Permissions.
■ Administrators and users with the Integration Application permission can configure applications to use
OAuth 2.0 to access RESTlets and REST web services. See Create Integration Records for Applications
to Use OAuth 2.0. For more detailed information, see the help topic Creating an Integration Record.
Authentication Guide
OAuth 2.0 Tasks for Administrators 67
To add permissions to a role, go to Setup > Users/Roles > Manage Roles. Select a role to customize. On
the Permission tab, Setup subtab, choose the permission from the list and click Add.
Note: A user assigned the OAuth 2.0 Authorized Applications Management permission cannot
access RESTlets and REST web services using OAuth 2.0. To use OAuth 2.0 for access to RESTlets
and REST web services, the user must be assigned a role that has the Log in Using OAuth 2.0
Access Tokens permission.
For more information, see Assign Users to Roles with OAuth 2.0 Permissions.
Next, you must set up applications to use OAuth 2.0 for authentication. See Create Integration Records
for Applications to Use OAuth 2.0
Authentication Guide
OAuth 2.0 Tasks for Administrators 68
Note: Values of the State and Note fields are specific to one NetSuite account. If you
install a record in a different account, the values can change. Values of the Name and
Description fields are read-only if the record is installed in a different account. For more
information, see the help topic Auto-Installation of Integration Records.
6. On the Authentication tab, check or clear the appropriate boxes for your application:
Authorization Code Grant You must check this box for OAuth 2.0 to work.
For more information, see OAuth 2.0 for Integration Application
Developers.
Redirect URI ■ Enter a valid redirect URI, where your application will handle the
code.
■ The redirect URI is validated when you save the integration record.
RESTlets Check this box if your OAuth 2.0 integration application requires
accessing RESTlets.
For more information, see OAuth
2.0 for RESTlets.
REST Web Services Check this box if your OAuth 2.0 integration application requires
accessing REST web services.
For more information, see OAuth
2.0 for REST Web Services.
Application Logo (Optional). You can select a file from your File Cabinet. Supported
formats are JPEG, PNG and GIF.
Application Terms of Use (Optional). You can select any PDF file from your File Cabinet.
Application Privacy Policy (Optional). You can select any PDF file from your File Cabinet.
Authentication Guide
OAuth 2.0 Tasks for Administrators 69
7. Click Save.
Warning: For security reasons, the only time that client credentials (client ID and client
secret) values are displayed is on the confirmation page. After you leave this page, these
values cannot be retrieved from the system. If you lose or forget the client ID and client
secret, you will have to reset them on the Integration page to obtain new values. Treat
these values like you treat a password. Never share the client ID and client secret with
unauthorized individuals and never send them by email.
1. Navigate to Setup > Integration > Managing Integrations, and open the appropriate integration
record for editing.
Important: OAuth 2.0 is only available for RESTlets and REST web services.
Important: The system displays the client ID and client secret only the first time you save
the integration record. In cases where an application previously used user credentials as an
authentication method, you must reset the client ID and client secret. In cases where the
application used TBA, the client ID and client secret are not displayed. You can either use
the same values as you used for TBA or reset them to get new values.
Warning: Resetting the client ID and client secret invalidates the previous client ID and
client secret. This can brake the access token previously used as authentication method of
the integration record.
Authentication Guide
OAuth 2.0 Tasks for Administrators 70
Important: Unlike the TBA tokens, you cannot create OAuth 2.0 Authorized Applications
directly in the UI. For more information, see OAuth 2.0 for Integration Application Developers.
Users with Log in using OAuth 2.0 Access Tokens permission can only access this page directly
from the Settings portlet by clicking the Manage OAuth 2.0 Authorized Applications link.
Important: Users can only list their own OAuth 2.0 authorized applications through the
Settings portlet link.
Revoking an authorized application invalidates all tokens associated with that application. However, the
application record is still present in the system and is still accessible for auditing purposes.
Note: The user who authorized the revoked application previously, must give a new consent on a
consent screen. This action creates a new authorized application record, with a new pair of tokens.
To revoke a permission for an authorized application, go to OAuth 2.0 Authorized Applications page, click
the link in Created column and click Revoke. After this action, the system enters values in the Revocation
Date field and the Revoked By field.
Authentication Guide
OAuth 2.0 Tasks for Administrators 71
Note: In case the scope of protected resources (RESTlets or REST web services) is extended
in the integration record, the system revokes the authorized application for that record and
automatically creates a new one.
For more information, see OAuth 2.0 Authorization Code Grant Flow.
The OAuth 2.0 authorization code grant flow consists of two steps and an additional refresh token
request.
With the OAuth 2.0 authorization code grant flow, the application begins the process to grant the access
token and refresh token by sending a GET request to the authorization endpoint. The user, for whom
the access token and refresh token are to be granted, explicitly consents to the application accessing
NetSuite through RESTlets or REST web services.
The Administrator must create integration records for each application. See Create Integration Records
for Applications to Use OAuth 2.0. The Administrator must configure the redirect URI on the integration
record. The underlying application must have the ability to open a browser.
Authentication Guide
OAuth 2.0 for Integration Application Developers 72
https://<accountID>.app.netsuite.com/app/login/oauth2/authorize.nl
where <accountID> represents your NetSuite account ID. If you do not know the specific account ID,
requests can be sent to
https://system.netsuite.com/app/login/oauth2/authorize.nl.
See the following table for details about parameters for the GET request.
redirect_uri ■ The valid redirect URI where the application handles the authorization code.
■ The value of the redirect URI parameter must match the redirect URI in the
corresponding integration record.
scope ■ The scope for which the application is requesting access. Values are restlets,
rest_webservices, or both. If the application requests access for both, the values are
separated by a white space.
■ The requested scope must be enabled in the corresponding integration record. For
more information, see Create Integration Records for Applications to Use OAuth 2.0.
state Length of the state parameter must be between 24 and 1024 characters. Valid
characters are all visible ASCII characters.
code_challenge_method ■ This parameter is optional, however, if you configure the code_challenge parameter,
you must configure the code_challenge_method parameter.
■ When the authorization server generates an authorization code, the code_challenge
and code_challenge_method parameters are associated with the authorization
code value, to ensure they are properly verified. For more information, see https://
tools.ietf.org/html/rfc7636#section-4.4.
Authentication Guide
OAuth 2.0 for Integration Application Developers 73
Important: Request parameters must be encoded based on the HTML specification for
application/x-www-form-urlencoded media type. For more information, see URL Specification 5.1.
https://1234567.app.netsuite.com/app/login/oauth2/authorize.nl?scope=restlets+rest_webservices&redirect_uri=https%3A%2F
%2Fmyapplication.com%2Fnetsuite%2Foauth2callback&response_type=code&client_id=6794a3086e4f61a120350d01b8527aed3631472e
f33412212495be65a8fc8d4c&state=ykv2XLx1BpT5Q0F3MRPHb94j
Consent Screen
After the application sends the GET request, the system displays the consent screen, where a user
authorizes the application to access NetSuite through RESTlets or REST web services.
Important: If there is no active NetSuite session, the user is first redirected to the NetSuite
login form. If the GET request points to an account-specific domain, for an account with SAML
SSO or OIDC enabled, the user can be redirected to a third party application. After successful
authentication, system displays the consent screen.
■ The Application Logo, Terms of Use and Privacy Policy, if these values were entered in the
integration record.
■ Protected resources to which the application requests access, RESTlets, REST web services, or both.
■ The Allow/Continue button. If the application was not authorized previously, the user must click
Allow to authorize the application. If the application was authorized before, there is a Continue
button that the user must click to continue to the next step of the flow.
■ The Deny/Go Back button. If the application was not authorized previously, the user can click Deny to
interrupt the flow. If the application was authorized before, the user can click Go Back to interrupt the
flow.
■ The Change Role list. The user can change a role that authorizes the application, by clicking the
Choose Role link in the list of roles.
Note: The system displays the consent screen for the application each time authorization code
grant flow is initiated.
state The state parameter in the redirect must match the state parameter in the request in
Step 1.
To avoid cross-site request forgery (CSRF) attacks, you must conform to the OAuth 2.0
specification. For more information, see RFC6749 Section 10.12.
Authentication Guide
OAuth 2.0 for Integration Application Developers 74
code ■ A randomly generated string that is used for request verification in Step 2.
■ The code parameter is only generated if the application was authorized.
role Indicates the user’s role for which the access token and refresh token are granted in
Step 2.
entity The ID of the user who authorizes the application or interrupts the flow.
https://myapplication.com/netsuite/oauth2callback?state=ykv2XLx1BpT5Q0F3MRPHb94j&role=1000&entity=12&compa
ny=1234567&code=70b827f926a512f098b1289f0991abe3c767947a43498c2e2f80ed5aef6a5c50
https://myapplication.com/netsuite/oauth2callback?state=ykv2XLx1BpT5Q0F3MRPHb94j&role=1000&entity=12&company=1234567&error=ac
cess_denied
After the request to the Redirect URI is sent, proceed to Step 2: POST Request to the Token Endpoint.
https://<accountID>.suitetalk.api.netsuite.com/services/rest/auth/oauth2/v1/token
redirect_uri The value of the redirect_uri parameter must match the value entered in the corresponding
integration record and the value in the request in Step 1.
code_verifier If the value of the code_verifier parameter does not match the value generated in Step 1, an
HTTP 400 Bad Response error is returned. For more information, see https://tools.ietf.org/
html/rfc7636, sections 4.5 and 4.6.
Authentication Guide
OAuth 2.0 for Integration Application Developers 75
■ Request parameters must be encoded based on the HTML specification for application/x-
www-form-urlencoded media type. For more information, see URL Specification 5.1
■ The client authentication method used in a header of the request follows the HTTP Basic
authentication scheme. For more information, see RFC 7617. The format is clientid:clientsecret.
The string value is Base64 encoded. The following code provides an example.
code=70b827f926a512f098b1289f0991abe3c767947a43498c2e2f80ed5aef6a5c50&redirect_uri=https%3A%2F%2Ffanyv88.com%3A443%2Fhttps%2Fmyapplication.com%2Fnetsuite
%2Foauth2callback&grant_type=authorization_code
access_token The value of the access_token parameter is in JSON Web Token (JWT) format. the
access token is valid for 60 minutes.
refresh_token The value of the refresh_token parameter is in JSON JWT format. The refresh token is
valid for seven days.
expires_in The value of the expires_in parameter is always 3600. The value represents the time
period during which the access token is valid, in seconds.
{"access_token":"eyJraWQiOiIyMDIwXzEiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxMDAwOzEyIiwiYXVkIjoiN0VCODkwREMtNEJDR
C00RTQ5LTkzNDEtRjZEMDIyNDUxOEY5OzM4Mjk4NTUiLCJ0dHlwZSI6IkFDQ0VTUyIsInNjb3BlIjpbIlJFU1RMRVRTIl0sImlzcyI6Imh0dHBzOlwvXC9zeXN0ZW0ub
mV0c3VpdGUuY29tIiwiZXhwIjoxNTgwODI1NjQyLCJpYXQiOjE1ODA4MjIwNDJ9.sTNSUlE1w-X_zhNPou_pRvHPob_p6iTkvA329yfVqrFFcgy0Ma14HA1WtlYmd8Xy8T
GvC5str_ZYEBNq9adNSb1inkgB4orFCus5plvCzuLaeA_kYWc6KEFq6Z2jfBBymrDtLqujvvBMxNan88KN0UXM7CaNDGrg7tUllcQcB6mJwiqrRMXPWPXSZMc17C
groIPwvNCaF7mK9np4V-s0nhlCCII_XuESWXZom2nJtserwiLC7db2psrmtXKSu0l75XRYWb8Qn1G3x56oYz56TAfjB2bM6kUYq-s4Io2QHHdD0HxZSH-d_i5gY3s
fCIqzr9Z4G8u6IHLN0fThDTt3hQ","refresh_token":"eyJraWQiOiIyMDIwXzEiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxMDAwOzEyIi
wiYXVkIjoiN0VCODkwREMtNEJDRC00RTQ5LTkzNDEtRjZEMDIyNDUxOEY5OzM4Mjk4NTUiLCJ0dHlwZSI6IlJFRlJFU0giLCJzY29wZSI6WyJSRVNUTEVUUyJdL
CJpc3MiOiJodHRwczpcL1wvc3lzdGVtLm5ldHN1aXRlLmNvbSIsImV4cCI6MTU4MTQyNjg0MiwiaWF0IjoxNTgwODIyMDQyfQ.LA3ks203Y99hK-kYg_v0V6MzG18p
mAO5eE8zoeVUHV-3BkZjrMwc827v92F_M17O1M1wXMBXUscFmusstUFrLPE1D55zqSBf3Z2ltfyEhWp_jS0PY-V1i7ulcBgtpLw80B2I2L3CsBTQ25PAyqH02GHWal7ji
A1aPoUqZkYqdMNwaeW6Qi6Qeiwz5_UHz0yVrLi698uCJe3cxezKBM1US5jmWulUaOfWAQYBzKpKeQfjnWvTSsf0jW3Z6BfkO8Orv4GL0gWEbAhRI4M5fHHP3h8OXuw3l7M
l8xVt-hZnqPtSBK9HmnkixTbE97q9r_lPPyGFSIa6cA6NQzURvvpByg","expires_in":"3600","token_type":"bearer"}
Note: The access token and refresh token are Base64 encoded. For more information, see RFC
7519.
After the access token and refresh token are granted, the integration record is auto-installed in the
account. If the integration record fails to auto-install, check the State field in the corresponding
integration record. Go to Setup > Integration > Manage Integrations, click the name of the corresponding
integration record. The value of the State field must be Enabled to auto-install the integration record
successfully.
Authentication Guide
OAuth 2.0 for Integration Application Developers 76
Note: The integration record should be auto-installed when the access token is granted, if the
Require Approval During Auto-installation of Integration box is not checked on the SOAP
Web Services Preferences page. If the box is checked, you must clear it to successfully auto-install
integrations.
You must change the state manually if an access token was granted for the integration record
before the box was cleared. To change the state manually, go to Setup > Integration > Manage
Integrations, click the name of the corresponding integration record and change the State field
value to Enabled.
https://<accountID>.suitetalk.api.netsuite.com/services/rest/auth/oauth2/v1/token
refresh_token The value of the refresh_token parameter is in JSON Web Token format.
Important: the client authentication method used in a header of the request follows
the HTTP Basic authentication scheme. For more information, see RFC 7617. The format is
client_id:client_secret. The string value is Base64 encoded. The following code provides an
example.
grant_type=refresh_token&refresh_token=eyJraWQiOiIyMDIwXzEiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxMDAwOzEyIiwiYXVkIjoiN0V
CODkwREMtNEJDRC00RTQ5LTkzNDEtRjZEMDIyNDUxOEY5OzM4Mjk4NTUiLCJ0dHlwZSI6IlJFRlJFU0giLCJzY29wZSI6WyJSRVNUTEVUUyJdLCJpc3MiOiJodHRwczp
cL1wvc3lzdGVtLm5ldHN1aXRlLmNvbSIsImV4cCI6MTU4MTQyNjg0MiwiaWF0IjoxNTgwODIyMDQyfQ.LA3ks203Y99hK-kYg_v0V6MzG18pmAO5eE8zoeVUHV-3BkZjrMw
c827v92F_M17O1M1wXMBXUscFmusstUFrLPE1D55zqSBf3Z2ltfyEhWp_jS0PY-V1i7ulcBgtpLw80B2I2L3CsBTQ25PAyqH02GHWal7jiA1aPoUqZkYqdMN
waeW6Qi6Qeiwz5_UHz0yVrLi698uCJe3cxezKBM1US5jmWulUaOfWAQYBzKpKeQfjnWvTSsf0jW3Z6BfkO8Orv4GL0gWEbAhRI4M5fHHP3h8OXuw3l7Ml8xVt-hZnqP
tSBK9HmnkixTbE97q9r_lPPyGFSIa6cA6NQzURvvpByg
access_token The value of the access_token parameter is in JSON Web Token (JWT) format. The
access token is valid for 60 minutes.
Authentication Guide
OAuth 2.0 for Integration Application Developers 77
expires_in The value of expires_in parameter is always 3600. The value represents the time period
during which the access token is valid, in seconds.
{"access_token":"eyJraWQiOiIyMDIwXzEiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxMDAwOzEyIiwiYXVkIjoiN0VCODkwREMtNE
JDRC00RTQ5LTkzNDEtRjZEMDIyNDUxOEY5OzM4Mjk4NTUiLCJ0dHlwZSI6IkFDQ0VTUyIsInNjb3BlIjpbIlJFU1RMRVRTIl0sImlzcyI6Imh0dHBzOlwvX
C9zeXN0ZW0ubmV0c3VpdGUuY29tIiwiZXhwIjoxNTgwODI1NjU5LCJpYXQiOjE1ODA4MjIwNTl9.cUZtP9rAxNwqAIzVRq0iFd161duTS-ALyoekKZgdFVpwF
dOG9vdlNW2kxoWfFMBd99ijSeRemrI8NPv8UYBcrwBdiyMTJ7ERJo--H-CYyPTiK4Lii2SIvjeGlbevxKcCe_Ulh4qZUAZKI6gdAGgQ2UJN9xUzSQssDXCDMqhtUs
zlxBtXYqzGqOj-ZkSvipQjXIu9hjgSyQRxfeIYEvW1KpMZELH6x2rOHx-0t4mbY3LQeq1X_dyQUsT9vXWlOB1RJKX9RUntE5_qKBjYmkgYDbKFvPw_F-kXeXqcupwq6HXr
jyCH5pzQsog5q_1VqJD5L5XISt3tXRyPHsdx1cEDaA","expires_in":"3600","token_type":"bearer"}
Note: The access token is Base64 encoded. For more information, see RFC 6749. section 1.4.
When the refresh token expires, the token endpoint returns an invalid_grant error. The application must
go back to Step 1 of the OAuth 2.0 authorization code grant flow to restart the process.
Note: Users can use the access token and refresh token to access RESTlets and REST web
services in case of being locked out.
■ sub – the value of the sub parameter is the role and entity of the user, separated by a semicolon. For
example, 1111;10.
■ aud – the value of the aud parameter is the integration record and company, separated by a
semicolon. For example, 1A111AA1–AA11–1A11–1111–A1A1111111A1;1111.
■ ttype – the value of the ttype parameter is either ACCESS or REFRESH.
■ scope – the value of the scope parameter is either RESTLETS, REST_WEBSERVICES
, or both, separated by a comma.
■ iss – the value of the iss parameter is https://system.netsuite.com.
■ exp – the value of the exp parameter represents the number of seconds until token’s expiration.
■ iat – the value represents the number of seconds since the token was issued.
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzVG466Sg2NEQF16f8IfPOifjDZew6IAAhFDJ9IehYHTlQC4Hdggh9/iQCeo7xROGKFxyCdNoGQt2QaQGbUSa3kB
WSYASaIzFJ+viBQBwvWu4imQVWrp9d3kCM6MR3hiRpzQ67PIUkTY6LzMH1hjfacgzO+vq61/nSBTzfC8cj+VxZweRJf08Y3rcjfEotX6+RgTenBlZGlqddND/dTzZCI4g/
pzupcRF8vd0LUDUBilSBlsl6D60wn2CaMg0Uwk+i7q4Vg42Oms694YTYdzA3/HC8VGb18m73B0IZDFui1YW529y5Ha+O4n8Ce8VRtTclyNrHDCPvtioKxa8c4T83QIDAQAB
Authentication Guide
OAuth 2.0 for Integration Application Developers 78
Authentication Guide
Troubleshooting OAuth 2.0 79
Important: The redirect does not take place if the redirect URI in
the GET request does not match the value in the Redirect URI field in
the corresponding integration record. Only the error message should be
displayed.
unauthorized_client The redirect does not take place if the client is unknown to the authorization server.
Only the error message should be displayed.
access_denied A user clicks the Deny or Back button on the consent screen and interrupts the
flow.
invalid_scope The scope cannot be handled. The scope value is malformed, unknown, or invalid.
https://<your_redirect_uri>?
state=ykv2XLx1BpT5Q0F3MRPHb94j&role=1000&entity=12&company=1234567&error=<error_value>
For more information on Step 1 of the OAuth 2.0 authorization code grant flow, see Step 1: GET Request
to the Authorization Endpoint.
{
"error": "<error_value>"
}
Basic realm=<accountID>
Authentication Guide
Troubleshooting OAuth 2.0 80
invalid_grant Any of the following conditions can cause the invalid_grant error
to occur:
■ The redirect URI does not match the redirect URI in the
authorization request.
■ The authorization code or refresh token cannot be associated
with the client.
■ The code_verifier parameter on Step 2 does not match the
code_verifier parameter in Step 1.
unauthorized_client The value of the authorization grant_type is not allowed for the
client.
For more information on Step 2 of the OAuth 2.0 authorization code grant flow, see Step 2: POST Request
to the Token Endpoint.
For more information on the refresh token request, see Refresh Token POST Request to the Token
Endpoint.
invalid_request The request could not be understood by the The request is in a wrong format. One or more
server due to malformed syntax. parameters are missing, repeated, or malformed.
invalid_token Invalid login attempt. The provided access token is expired, revoked,
malformed, or invalid.
The following examples show headers for the errors in the table above:
Authentication Guide
Troubleshooting OAuth 2.0 81
error="invalid_request",
error_description="The request could not be understood by the server due to malformed syntax."
Note: The value of the realm is the account ID for which the data are requested.
■ RESTlets and REST Web Services Error Messages in the Login Audit Trail
■ Authorization Code Grant Flow Error Messages in the Login Audit Trail
■ The Refresh Token Request Error Messages in the Login Audit Trail
For more information about defining Login Audit Trail searches, see the help topic Login Audit Trail
Overview.
The access token is AccessTokenExpired Use the refresh token to get a new access
expired. token. If the refresh token is expired, initiate the
authorization code grant flow to get a new pair
of tokens. For more information, see OAuth 2.0
Authorization Code Grant Flow.
At least one of the EntityOrRoleDisabled Verify that the entity, contact, or role exists in the
following is invalid: account.
Authentication Guide
Troubleshooting OAuth 2.0 82
The signature is invalid. InvalidSignature Ensure you use the correct public key for token
validation. For more information, see OAuth 2.0
Access and Refresh Token Structure.
Login attempted with a TokenRejected Ensure that the application uses the access token
refresh token. for access and the refresh token for the refresh
token POST request. For more information,
see Refresh Token POST Request to the Token
Endpoint.
The integration ScopeMismatched Ensure that either the RESTlets or REST Web
application has empty Services box is checked in the corresponding
scope or the scope in the integration record. For more information, see
token does not match the Create Integration Records for Applications to Use
scope in the integration OAuth 2.0.
record.
The integration AuthorizationCodeGrantRequired Ensure that the Authorization Code Grant box is
application does not use checked in the corresponding integration record.
OAuth 2.0. For more information, see Create Integration
Records for Applications to Use OAuth 2.0.
The scope value is empty InvalidScope Ensure that the structure of the access token
in the token. is correct. For more information, see OAuth 2.0
Access and Refresh Token Structure.
Either role or entity is EntityOrRoleDisabled Verify that the entity or role is active in the account.
inactive.
The OAuth 2.0 feature FeatureDisabled See Enable the OAuth 2.0 Feature.
is not enabled in the
account.
The integration record is IntegrationBlocked Ensure that the value of the State field is set to
blocked. Enabled on the corresponding integration record.
For more information, see Create Integration
Records for Applications to Use OAuth 2.0.
Authentication Guide
Troubleshooting OAuth 2.0 83
Either role or entity is N/A EntityOrRoleDisabled Verify that the entity or role is
inactive. active in the account.
The value of the state InvalidState N/A Ensure that the value of the state
parameter is invalid. parameter:
Either client ID or client UnknownIntegration ClientAuthenticationFailed Ensure you use the correct
secret is invalid. values of the client ID and client
secret for the corresponding
integration record.
The value of the InvalidRedirectURI N/A Ensure that the redirect URI is a
redirect URI parameter valid URL. for more information,
is invalid. see Create Integration Records
for Applications to Use OAuth
2.0.
The user clicked Deny/ AuthorizationExplicitly N/A Start the OAuth 2.0 authorization
Back on the consent Denied code grant flow again and click
screen. Allow/Continue on the consent
screen.
The value of the grant N/A InvalidGrantType Ensure that the grant type
type parameter is value used is the correct one in
either invalid or wrong. the corresponding step of the
authorization code grant flow.
For more information, see OAuth
2.0 Authorization Code Grant
Flow.
Authentication Guide
Troubleshooting OAuth 2.0 84
The OAuth 2.0 feature FeatureDisabled FeatureDisabled See Enable the OAuth 2.0
is not enabled in the Feature.
account.
The integration record IntegrationBlocked IntegrationBlocked Ensure that the value of the
is blocked. State field is set to Enabled on
the corresponding integration
record. For more information,
see Create Integration Records
for Applications to Use OAuth
2.0.
Parameters for the InvalidRequest N/A If you use PKCE in OAuth 2.0,
Proof Key for Code make sure you configured the
Exchange (PKCE) are parameters correctly. For more
missing or malformed information, see Step 1: GET
Request to the Authorization
Endpoint.
The access token is RefreshTokenExpired Use the refresh token to get a new access
expired. token. If the refresh token is expired, initiate the
authorization code grant flow to get a new pair
of tokens. For more information, see OAuth 2.0
Authorization Code Grant Flow.
At least one of the EntityOrRoleDisabled Verify that the entity, contact, or role exists in the
following is invalid: account.
■ Entity
■ Contact
■ Role
The signature is invalid. InvalidSignature Ensure you use the correct public key for token
validation. For more information, see OAuth 2.0
Access and Refresh Token Structure.
Authentication Guide
Troubleshooting OAuth 2.0 85
The integration ScopeMismatched Ensure that either the RESTlets or REST Web
application has empty Services box is checked in the corresponding
scope or the scope in the integration record. For more information, see
token does not match the Create Integration Records for Applications to Use
scope in the integration OAuth 2.0.
record.
The integration AuthorizationCodeGrantRequired Ensure that the Authorization Code Grant box is
application does not use checked in the corresponding integration record.
OAuth 2.0. For more information, see Create Integration
Records for Applications to Use OAuth 2.0.
The scope value is empty InvalidScope Ensure that the structure of the access token
in the token. is correct. For more information, see OAuth 2.0
Access and Refresh Token Structure.
Either role or entity is EntityOrRoleDisabled Verify that the entity or role is active in the account.
inactive.
Either client ID or client ClientAuthenticationFailed Ensure you use the correct values of the client ID
secret is invalid. and client secret for the corresponding integration
record.
The value of the grant InvalidGrantType Ensure that the grant type value used is the correct
type parameter is either one in the corresponding step of the authorization
invalid or wrong. code grant flow. For more information, see OAuth
2.0 Authorization Code Grant Flow.
The application attempted InvalidRefreshToken Ensure that the application uses the access token
the refresh token request for accessing RESTlets and REST web services,
with an access token. and the refresh token for the refresh token POST
request. For more information, see Refresh Token
POST Request to the Token Endpoint.
The OAuth 2.0 feature FeatureDisabled See Enable the OAuth 2.0 Feature.
is not enabled in the
account.
The integration record is IntegrationBlocked Ensure that the value of the State field is set to
blocked. Enabled on the corresponding integration record.
For more information, see Create Integration
Records for Applications to Use OAuth 2.0.
Authentication Guide
Troubleshooting OAuth 2.0 86
https://<accountID>.app.netsuite.com/app/site/hosting/restlet.nl?script=1&deploy=1
The following is an example of the OAuth 2.0 authorization header for RESTlets:
For more information, see Setting up OAuth 2.0 for a RESTlet Integration.
https://<accountID>.suitetalk.api.netsuite.com/services/rest/record/v1/customer
The following is an example of the OAuth 2.0 authorization header for REST web services:
For more information, see the help topic Setting Up OAuth 2.0 Authentication for REST Web Services.
Note: Web Services Only roles are only for access to NetSuite through web services. Roles with
the Web Services Only restriction will not work with RESTlets.
Authentication Guide
OAuth 2.0 for RESTlets 87
Important: For information on OAuth 2.0 authorization header for RESTlets, see OAuth 2.0
Authorization Header.
Note: Applications authorized using the OAuth 2.0 feature in your NetSuite production account
are not copied to your Release Preview or to your sandbox accounts. Users must authorize
applications explicitly in Release Preview or in a sandbox to test OAuth 2.0 feature in these
accounts. Each time the sandbox is refreshed, users must authorize applications explicitly in the
sandbox.
Note: Applications authorized using the OAuth 2.0 feature in your NetSuite production account
are not copied to your Release Preview or to your sandbox accounts. Users must authorize
applications explicitly in Release Preview or in a sandbox to test OAuth 2.0 feature in these
accounts. Each time the sandbox is refreshed, users must authorize applications explicitly in the
sandbox.
https://<accountID>.suitetalk.api.netsuite.com/services/rest/record/v1/customer
The following is an example of the OAuth 2.0 authorization header for REST web services:
Authentication Guide
OAuth 2.0 for REST Web Services 88
mV0c3VpdGUuY29tIiwiZXhwIjoxNTgwODI1NjQyLCJpYXQiOjE1ODA4MjIwNDJ9.sTNSUlE1w-X_zhNPou_pRvHPob_p6iTkvA329yfVqrFFcgy0Ma14HA1WtlYmd8Xy8T
GvC5str_ZYEBNq9adNSb1inkgB4orFCus5plvCzuLaeA_kYWc6KEFq6Z2jfBBymrDtLqujvvBMxNan88KN0UXM7CaNDGrg7tUllcQcB6mJwiqrRMXPWPXSZMc17C
groIPwvNCaF7mK9np4V-s0nhlCCII_XuESWXZom2nJtserwiLC7db2psrmtXKSu0l75XRYWb8Qn1G3x56oYz56TAfjB2bM6kUYq-s4Io2QHHdD0HxZSH-d_i5gY3s
fCIqzr9Z4G8u6IHLN0fThDTt3hQ
Authentication Guide
Two-Factor Authentication (2FA) 89
Two-factor authentication (2FA) allows enforcement of a second level of security for logging in to the
NetSuite user interface. Using 2FA can protect your company from unauthorized access to data.
Each verification code is a unique series of numbers valid for a limited time, and only for a single login.
Users can specify how they wish to receive verification codes when they set up their 2FA preferences. To
read 2FA help topics available to users, see the help topic Logging In Using Two-Factor Authentication
(2FA).
Important: Authenticator apps for generating 2FA verification codes are supported in
all NetSuite accounts. Users should select an authenticator app as the primary method of
authentication. SMS and voice call are subject to carrier availability and changes in local
regulations. Therefore, delivery of verification codes by SMS or voice call is not as reliable as using
an authenticator app. See the help topic Supported Authenticator Apps.
Note: OAuth 2.0 is only available for use with RESTlets and REST web services. It cannot be
used with SOAP web services.
■ If a role is designated as a SAML Single Sign-on (SSO) role, the SAML authentication requirement takes
precedence, and the 2FA requirement is ignored.
Authentication Guide
Benefits of 2FA in Your NetSuite Account 90
Note: The NetSuite feature that required RSA SecurID tokens is no longer available for purchase.
Customers requiring 2FA for account access should use the 2FA solution built in to NetSuite.
Note: For information on other authentication methods available in NetSuite, see Authentication
Overview
Authentication Guide
Managing Two-Factor Authentication 91
Important: 2FA is mandatory for the Administrator role and other roles with highly
privileged permissions. These roles are indicated in Mandatory 2FA column on the Two-Factor
Authentication Roles page. For a list of roles that are considered highly privileged, see the help
topic Permissions Requiring Two-Factor Authentication (2FA).
■ For roles that you want to restrict as 2FA roles, designate the role as 2FA authentication required. See
Designate Two-Factor Authentication Roles.
■ When using 2FA, after administrators designate roles and assign them to users, the users:
□ Are sent a verification code by email during the initial login attempt to a 2FA role.
□ Must set up 2FA preferences, select a primary authentication method, and should select a
secondary authentication method. See the following for help written for users: Set up Your
Preferences for Two-Factor Authentication (2FA).
▬ To receive verification codes using an Authenticator App, users must set up an authenticator
application.
Authentication Guide
Managing Two-Factor Authentication 92
Important: Authenticator apps for generating 2FA verification codes are supported
in all NetSuite accounts. Users should select an authenticator app as the primary
method of authentication. SMS and voice call are subject to carrier availability and
changes in local regulations. Therefore, delivery of verification codes by SMS or voice
call is not as reliable as using an authenticator app. See the help topic Supported
Authenticator Apps.
▬ To receive verification codes by phone, users must register a phone number in NetSuite, which
is tied to the user’s email address.
▬ Users are provided ten backup codes, to be used when they are not able to receive a
verification code through their authenticator app, SMS message, or a voice call.
Each time a user logs in to NetSuite, they must enter an email address and password. If the role is a 2FA
authentication required role, the user must enter a verification code obtained from an authenticator app,
or from an SMS message or voice call. Each verification code is a unique series of numbers valid for a
limited time, and only for a single login. During setup, users are also supplied with backup codes that can
also be used for 2FA access.
Tip: Are your users planning a trip to a location where they do not have phone service?
Authenticator apps can provide a verification code even when there is no phone service. They
should also take their backup codes with them. Remind them to keep their backup codes secure.
Do not store backup codes with the login device.
For help written for users, see the help topic Logging In Using Two-Factor Authentication (2FA).
An account administrator or another user with the Two-Factor Authentication base permission can
use the Two-Factor Authentication Roles page to indicate roles that require 2FA for login. Each 2FA
role can be configured to specify how often users with that role should be presented with the 2FA
challenge. The default is per session, and the Duration of Trusted Device column includes values for
hours (4, 6, 8, 12) and days (1–30). The value specified in the Duration of Trusted Device column works in
conjunction with the devices users indicate as trusted devices. See Users and Trusted Devices for Two-
Factor Authentication for more information.
Important: The 2FA authentication required designation can be applied to most roles,
including Employee Center, Partner Center, and Vendor Center roles, but not to Customer Center
roles.
2FA is mandatory for the Administrator role and other roles with highly privileged permissions. These
roles are indicated in the Mandatory 2FA columns on the Two-Factor Authentication Roles page. For more
information, see the help topic Permissions Requiring Two-Factor Authentication (2FA).
Authentication Guide
Designate Two-Factor Authentication Roles 93
3. In the Duration of Trusted Device column, accept the default (Per session) or select the length
of time before a device a user has marked as trusted will be subject to a two-factor authentication
request.
4. Click Submit.
Note: The Two-Factor Authentication feature is not compatible with web services or
SuiteAnalytics Connect. To use web services or SuiteAnalytics Connect, you must be logged in
with a role that does not require 2FA. If you want to use RESTlets or web services with a highly
privileged role, use Token-based Authentication or OAuth 2.0. See Token-based Authentication
(TBA) or OAuth 2.0 for more information. OAuth 2.0 cannot be used with SOAP web services.
If you need more information about setting up access or roles in NetSuite, see the help topics NetSuite
Roles Overview and NetSuite Access Overview.
Users with 2FA authentication required roles can specify devices as trusted when logging in to the 2FA
role. Marking a device as trusted works in conjunction with the value specified by the Administrator in the
Duration of Trusted Device column for a particular role.
For example, a role has been designated as 2FA required, and the value for Duration of Trusted Device
has been set to 30 days. The next time a user with this role logs in, they can choose whether to check the
Trust this device box.
In cases where a user has access to more than one company, and the user’s role is 2FA authentication
required, marking a device as trusted makes that device trusted across all companies to which the user
has access.
Authentication Guide
Users and Trusted Devices for Two-Factor Authentication 94
The user is in complete control of whether devices are considered trusted. In this example, the user could
check the Trust this device box and then would not be presented with a 2FA challenge for 30 days when
logging in to NetSuite from this device.
After a user has marked a device as trusted, the user can modify that choice on the Manage Trusted
Devices page.
For example, this user marked a device as trusted. That is, the user previously chose not to be asked for a
Two-Factor Authentication (2FA) verification code on this device.
The user can reverse that choice by selecting a Restore 2FA required... option. If the 2FA required is
restored for a device, the user must use a 2FA authenticator app, phone, or a backup code to log in.
There is a link on the Settings portlet to access the Manage Trusted Devices page.
Two–Factor Authentication, or 2FA, is available for all companies using NetSuite in all their NetSuite
accounts as a method of improving security. 2FA can help you to comply with IT security standards and
Authentication Guide
2FA in the NetSuite Application 95
regulations, using phones your users already have. 2FA is not tied to a single company in NetSuite. As
long as the user’s session remains valid, the user will not be asked again for a verification code when they
switch between roles, even when switching between roles in different companies.
Important: Authenticator apps for generating 2FA verification codes are supported in
all NetSuite accounts. Users should select an authenticator app as the primary method of
authentication. SMS and voice call are subject to carrier availability and changes in local
regulations. Therefore, delivery of verification codes by SMS or voice call is not as reliable as using
an authenticator app. See the help topic Supported Authenticator Apps.
The option to use an Authenticator App for 2FA is available in your account, and is the recommended
option for users with roles that are designated as 2FA authentication required. It is not always possible
for users to receive an SMS message or voice call. Authenticator apps are always available for generating
verification codes. See the help topic Supported Authenticator Apps for more information on choosing an
app.
To use 2FA, account administrators (or other users with the permission Two-Factor Authentication
base) must designate specific roles as 2FA authentication required roles. See Designate Two-Factor
Authentication Roles for more information.
Each user assigned to a 2FA role designated as 2FA authentication required must set up an
authenticator application or a phone number in NetSuite. The user’s phone number is linked to the email
address they use to log in to the NetSuite UI.
After a role has been designated as 2FA authentication required, a user assigned to that role receives
an email the first time they attempt to login to the 2FA role. The email contains instructions and a
verification code for initial login.
After completing the initial login to a 2FA role, a wizard opens allowing the user to select their preferred
options for generating 2FA verification codes.
See the help topic Logging In Using Two-Factor Authentication (2FA) for documentation written for those
users who are not administrators.
Important: To initiate a password reset for a user who has access to multiple NetSuite
accounts, you must be an Administrator in all of those accounts. The User Access Reset Tool is
also available to users with Core Administration Permissions, but the same restriction applies.
Users who are not Administrators but have only Core Administration Permissions cannot reset
the password for a user who has access to multiple NetSuite accounts. (See the help topic Core
Administration Permissions if you need more information about this feature.)
To reset a user’s 2FA settings with the User Access Reset Tool:
1. In an Administrator role, or a role with Core Administration Permissions (CAP), go to Setup > Users/
Roles > User Management > User Access Reset Tool.
2. On the User Access Reset page, enter the email address of the user who requires your help.
3. Check the appropriate box or boxes. You can check multiple boxes if the user needs help with
more than one thing.
a. Initiate Password Reset: check this box to send an email to the user containing a link so
that the user can reset the NetSuite password.
Authentication Guide
2FA in the NetSuite Application 96
b. Clear User’s Security Questions: check this box to clear the user’s security questions. The
user will be prompted to set up new security questions and answers after the next login to
NetSuite.
c. Unlock The User’s Access: check this box to unlock NetSuite access for a user who is locked
out of NetSuite after submitting six consecutive incorrect passwords.
d. Reset 2FA Settings: check this box to reset (or clear) the user’s settings for 2FA. The user
will be prompted to enter new 2FA settings after the next login to NetSuite with a 2FA
required role.
4. Click Save.
Important: If you receive an error message that the 2FA settings cannot be reset, it
usually indicates that you do not have management over all the accounts that the user
has access to under that email address. Click Go Back and click Cancel. Contact NetSuite
Customer Support for assistance with resetting the 2FA settings for the user.
A confirmation page states that the registered 2FA devices have been successfully reset.
Although the phone number setup required for users is fairly straightforward, you or your users might
have questions about the supported delivery methods available in your country for receiving verification
codes.
The following table lists supported countries and the supported delivery methods for access to NetSuite.
Voice call
Voice call
Authentication Guide
Supported Countries: SMS and Voice Call 97
Voice call
Anguilla SMS +1
Voice call
Voice call
Voice call
Voice call
Voice call
Bahamas SMS +1
Barbados SMS +1
Voice call
Voice call
Authentication Guide
Supported Countries: SMS and Voice Call 98
Bermuda SMS +1
Voice call
Voice call
Voice call
Canada SMS +1
(Netherlands Antilles)
Voice call
China +86
Authentication Guide
Supported Countries: SMS and Voice Call 99
Voice call
Voice call
Voice call
Voice call
Voice call
Voice call
Dominica SMS +1
Voice call
Authentication Guide
Supported Countries: SMS and Voice Call 100
Voice call
Voice call
Voice call
Voice call
Voice call
Voice call
Voice call
Grenada SMS +1
Guam SMS +1
Authentication Guide
Supported Countries: SMS and Voice Call 101
Voice call
Voice call
Voice call
Voice call
Voice call
Voice call
Voice call
Voice call
Voice call
Jamaica SMS +1
Voice call
Authentication Guide
Supported Countries: SMS and Voice Call 102
Kazakhstan SMS +7
Voice call
Voice call
Voice call
Voice call
Voice call
Voice call
Voice call
Voice call
Voice call
Voice call
Authentication Guide
Supported Countries: SMS and Voice Call 103
Voice call
Voice call
Voice call
Voice call
Voice call
Montserrat SMS +1
Voice call
Voice call
Authentication Guide
Supported Countries: SMS and Voice Call 104
Voice call
Voice call
Voice call
Voice call
Voice call
Voice call
Voice call
Voice call
Voice call
Voice call
Russia SMS +7
Authentication Guide
Supported Countries: SMS and Voice Call 105
(French side)
Voice call
Voice call
Voice call
Voice call
Voice call
Voice call
Authentication Guide
Supported Countries: SMS and Voice Call 106
Voice call
Voice call
Voice call
Voice call
Voice call
Voice call
Voice call
(East Timor)
Voice call
Authentication Guide
Supported Countries: SMS and Voice Call 107
Voice call
Voice call
Voice call
Voice call
Voice call
Voice call
Voice call
Voice call
Voice call
Authentication Guide
Supported Countries: SMS and Voice Call 108
Authentication Guide
Device ID Authentication 109
Device ID Authentication
Device ID Authentication allows account administrators to restrict login to only approved devices. Devices
can be registered in NetSuite using a unique identifier. After reviewing registered devices, the account
administrator can approve or reject individual devices. Only devices approved by the administrator can
log in.
The Device ID feature is enabled by default. No special setup or configuration in NetSuite by account
administrators is required to use the device record.
For more information on SCIS, see the help topic SuiteCommerce InStore Administrator’s Overview. See
also, Installing the SCIS Mobile App.
Device records are automatically created in NetSuite as users log in for the first time using POS devices
with the SCIS POS application installed. Users are then notified that they must wait for the device to be
approved before they can use SCIS on that device. NetSuite account administrators maintain a list of
approved POS devices in NetSuite. Only the devices that have been reviewed and approved have access
to SCIS.
When the SuiteCommerce InStore SuiteApp is installed in a NetSuite account, it automatically creates a
role restricted by device ID. This is the only role allowed to log in to SCIS on a device configured with the
SCIS POS application.
Users with device ID role who attempts to log in using an authorized device receives the error message
"No device id role was found". The user must contact the account administrator and request to be
assigned an SCIS device ID role.
Account administrators can create additional device ID restricted roles if desired, using the SCIS-created
roles as a template. For more information on SCIS roles, see the help topic SCIS Roles and Permissions.
The first time a user attempts to log in to SCIS on a device running the SCIS POS application, a unique
device identifier is sent to NetSuite. The name of the device is also sent. With this information, a Device
record is created in NetSuite in Pending status. Users cannot log in to SCIS with the device until the
NetSuite account administrator reviews the device record and changes the device status to Trusted. This
requirement ensures that only devices approved by the NetSuite account administrator can be used to
log in. The account administrator can also change the device status to block a device, or put a device
record on hold.
Authentication Guide
Device ID and the SCIS SuiteApp 110
Note: Users with device ID-restricted roles are not asked security questions. See the help topic
Setting Up Security Questions for more information.
Important: To allow the account administrator the opportunity to verify the device, the device
ID is displayed in full. As soon as the account administrator changes the status, the device ID is
masked and cannot be retrieved from the system.
Note: After the device record has been created, NetSuite recommends you do not change the
device name on the device. If the name is changed on the device, administrators would need to
make the corresponding update to the device record in NetSuite. The device record in NetSuite is
never updated by the POS application on the device after the initial login creates the record.
In the following screenshot, the account administrator has created two additional device records
manually. (See Creating Device Records Manually for more information.)
In this example, the administrator did not provide the optional Device Name when creating the records,
and changed the device status to Pending before saving each record. NetSuite automatically created a
Device Name using the Device ID, masking everything except the last four digits.
Authentication Guide
Managing Devices on the List of devices Page 111
The following screenshot is an example of the account administrator reviewing the List of devices, and
changing the status of each device. The account administrator is sure the Device IDs for the automatically
created records are correct, and changes the status to Trusted.
For the manually created records, the account administrator wants more time to verify the Device ID
numbers are correct, and changes the status for these records to On Hold. The following screenshot
shows the list of devices after the statuses were changed, and the page was refreshed. All of the Device
IDs have been masked, except for the last four digits.
Important: The only time the Device IDs are shown in full is when a device remains in the
status in which it was initially created. This allows the account administrator to verify the Device ID.
Treat Device IDs as securely as you would treat a password.
As soon as the device status is changed, the Device ID is masked, and cannot be retrieved from the
system.
■ To open a record, click Edit or View in the appropriate row on the List of devices page.
■ To create a device record manually, click New Device ID. See Creating Device Records Manually.
Note: An alternative method of creating a new device manually is available on the Device
page. Select New from the Actions list to open a blank Device record.
■ To view the System Notes for a device, see Viewing System Notes
■ To delete a device record, see Deleting a Device Record.
Authentication Guide
Creating Device Records Manually 112
Authentication Guide
Creating Device Records Manually 113
For more information about system notes, see the help topic System Notes Overview.
4. If you are sure you want to delete this device, click OK.
A confirmation notice displays on the List of devices page.
Note: You can search for a device’s login history using the Login Audit Trail search capabilities,
even after the device record has been deleted. See the help topic Login Audit Trail Overview. Only
a device that has been used for login leaves a login audit trail. Searching for a device that was
never used for login will have no results.
Authentication Guide
Outbound Single Sign-on (SuiteSignOn) 114
Note: Calls initiated by SOAP web services are not supported by SuiteSignOn.
Note: SuiteSignOn access from your web store is supported. After reading through the
Outbound SSO help topics, see also Outbound Single Sign-on (SuiteSignOn) Access from Your Web
Store.
SuiteSignOn Benefits
The SuiteSignOn feature provides the following benefits:
■ Improved usability: Users can access other applications with their NetSuite login credentials, so they
can complete daily tasks more quickly. They do not need to repeatedly log in and log out of multiple
applications, or manage multiple sets of login credentials. They can log in a single time to NetSuite,
and access an integrated solution within a single user interface.
■ Increased security and central access control: The password policy that is enforced for NetSuite
access is enforced for any integrated application, providing consistency and limiting potential security
issues.
■ Reduced IT and support costs: The rollout of integrated applications is simplified because there is no
need to maintain multiple databases for user credentials and access control.
■ NetSuite as the single trusted system for authentication: Access from the NetSuite user interface
to an external application user interface is confined to an iFrame. The external application does not
have rights to change data in NetSuite except through specialized SOAP web services calls.
■ More secure SOAP web services integrations: The integrated application can use an already active
session to transmit data to NetSuite through SOAP web services calls, instead of requiring the user to
log in again. Changes submitted through SOAP web services are reflected in the NetSuite audit trail
for the logged in user who makes the specific changes. SOAP web services use the same role that was
used to log in the user to NetSuite.
Authentication Guide
SuiteSignOn Overview 115
Important: If you are attempting to implement inbound single sign-on from an external
application to NetSuite, use one of the following NetSuite inbound SSO features:
See also Authentication Overview, which includes a Single Sign-on (SSO) Overview section.
SuiteSignOn Overview
SuiteSignOn provides seamless integration of NetSuite with other applications through outbound single
sign-on. With this feature, NetSuite users can access external applications directly from the NetSuite user
interface without additional authentication.
Anyone using the SuiteSignOn feature should see the following topics:
Application providers who want to sell their applications and services to customers who also use
NetSuite must see these topics as well:
Application developers who may need more information about certain NetSuite features for creating a
SuiteSignOn solution should see the following topics:
Administrators who will be responsible for exposing third-party applications to NetSuite users should
see Making SuiteSignOn Integrations Available to Users. In cases where the administrator might also be
responsible for building a custom integration should see the topics pertaining to application providers.
Authentication Guide
SuiteSignOn Overview 116
Important: Be aware of the following: Administrators should exercise caution when integrating
with third-party applications using SuiteSignOn. Some integrations may require access to, or even
modify, some data in your NetSuite account. Make sure you review the data requirements and
understand what kind of information is accessed, retrieved, modified, or deleted by the third-party
system. NetSuite has no control, responsibility, or liability regarding any third-party applications,
even if NetSuite offers resale and integration options for customers' convenience. You use and
integrate with third-party applications at your sole risk.
Understanding SuiteSignOn
Each location in the NetSuite user interface where users can access an external application through
SuiteSignOn is called a connection point. An application can have multiple connection points on different
NetSuite pages. Currently, custom subtabs, custom portlets, and Suitelets are supported as connection
points. User event scripts also are supported as connection points for SOAP web services integrations
between NetSuite and external applications.
To implement single sign-on integration with an application, the application provider needs to set up
information for each connection point. This information includes the name of the NetSuite subtab, portlet,
Suitelet, or user event script connection point, the external application landing page, optional data that
sets context for the landing page, and optional user identification data.
NetSuite authenticates each user upon login. When a user accesses a connection point, NetSuite initiates
a two-way communication with the external application, and verification data passes between the two
applications. This communication is referred to as a handshake, because of its back and forth nature.
After the handshake has been completed, the external application landing page displays in the subtab,
portlet, or Suitelet interface. Also, if the application provider has included related SOAP web services calls
in their application code, users' edits to external application data can be transferred to NetSuite.
For more information about how SuiteSignOn connections work, see SuiteSignOn Sequence Diagram and
Connection Details.
For an overview of the ways in which a company can benefit from a SuiteSignOn implementation, see the
help topic SuiteSignOn Benefits.
Authentication Guide
SuiteSignOn Sequence Diagram and Connection Details 117
Authentication Guide
SuiteSignOn Sequence Diagram and Connection Details 118
Warning: The outbound HTTP call still includes a dc and an env URL parameters, but you
should not use them. Using the hard-coded mapping between the dc parameter and the
URL might cause problems when your account is moved to a different data center that is
missing in your mapping.
4. Verify request: The external application sends back to NetSuite the token, the consumer key, and
the signature , along with other information such as the timestamp and nonce, to verify the user.
The consumer key is a unique identifier for the application provider, generated by NetSuite when
the application provider sets up a SuiteSignOn connection. The signature is computed from the
shared secret, the password defined by the application provider during this setup, based on the
OAuth 1.0 standard. For information on computing the signature, see Generate the Signature for
the OAuth Header for Outbound SSO for information about the signature. See also the OAuth 1.0
Protocol, RFC 5849.
5. Verify response: NetSuite responds to the verification, sending any user identification
information that was previously defined as necessary for the connection, in XML format. This
information will be used by external application to uniquely identify the NetSuite user. For details
about secure combinations of fields that should be used to uniquely identify users, please read
Choosing User Identification Fields for SuiteSignOn.
6. Outbound single sign-on response: The external application sends the HTML for the landing
page, and the page displays. Or, if there is a problem, an error is returned instead.
Important: These steps may or may not occur, depending on the situation:
7. The user makes changes in the external application page displayed in NetSuite, then saves them.
8. SOAP web services request: The external application sends a SOAP web services request, that
includes the token and shared secret along with other verification data, to NetSuite.
9. SOAP web services response: NetSuite sends a SOAP web services response to the external
application, and either the changes are saved to NetSuite, or an error is returned. SOAP web
services uses the same role that was used to log in to NetSuite.
Authentication Guide
SuiteSignOn Sequence Diagram and Connection Details 119
■ The token that NetSuite generates is good for the length of the UI session, or for 20 minutes of
inactivity.
■ If a user repeats step 2 multiple times during a single session, steps 4-5 can be skipped (at the
discretion of the third-party client) after the first time.
■ If the user logs out of NetSuite and logs back in, or switches roles, when the user clicks on the
connection point, a new token is generated.
Client and Server Maybe Maybe Required if the connection points are
SuiteScript created using custom portlets, Suitelets,
or user event scripts, client and server
SuiteScript should be enabled. Not required
for subtab connection points.
Authentication Guide
Setting Up SuiteSignOn Integration 120
2. Application providers must add required code to their application to support the exchange of
token and shared secret information with NetSuite, referred to as the handshake. For sample code,
see SuiteSignOn Definitions, Parameters, and Code Samples. These code additions include:
■ A verify call in the HTTP header and code that requests token verification from NetSuite
■ (Optional) SOAP web services calls to transfer data between NetSuite and your application
3. Create one or more custom subtabs, portlets, Suitelets or user event scripts to be connection
points that provide access to the integrated application. See Creating SuiteSignOn Connection
Points.
Important: Only a Suitelet connection point is supported for SuiteSignOn access from
your web store.
b. You must determine a way for account administrators to enter or import values for these
fields as needed.
See Using Custom Fields as SuiteSignOn User Identification.
5. Create a NetSuite SuiteSignOn record. See Creating SuiteSignOn Records.
6. (Application providers) Create a SuiteBundle that includes SuiteSignOn connection data and
custom objects, write bundle documentation instructing administrators how to set it up in their
accounts, and make the bundle available to NetSuite users. See Creating a SuiteSignOn Bundle.
7. (NetSuite administrator) Install the SuiteSignOn bundle created by the application provider. See
Making SuiteSignOn Integrations Available to Users.
Important: You must have the SuiteSignOn permission to create or edit SuiteSignOn records.
■ To create a new SuiteSignOn record for an application, go to Setup > Integration > SuiteSignOn > New.
■ To edit an existing SuiteSignOn record for an application, go to Setup > Integration > SuiteSignOn and
click Edit for a record.
See Editing SuiteSignOn Records.
Authentication Guide
Creating SuiteSignOn Records 121
After you are done with these tasks, you can build a SuiteSignOn bundle to distribute to your customers.
See Creating a SuiteSignOn Bundle.
Warning: For bundled SuiteSignOn integrations, the SuiteSignOn record is completed by the
application provider, and administrators install the bundle that contains this data, making edits to
the record as instructed in the bundle document. If administrators attempt to make other edits to
this page, issues are likely to arise. See Making SuiteSignOn Integrations Available to Users.
■ Name - A name for the external application integration, to display in NetSuite lists.
■ ID - A script ID for this integration, to be passed as a parameter in the portlet script. The value you
enter here is automatically prepended with customsso. You should assign a unique script ID to your
SuiteSignOn object if you intend to bundle and distribute your integration.
■ Shared Secret - A password used to establish ownership of the Consumer Key generated by NetSuite.
This value is included in the signature passed in your HTTP header, and needs to be referenced in your
application verification code.
Important: See Notes about Modifying the Shared Secret for tips about changes to this
password.
■ Consumer Key - You cannot enter or edit this globally unique identifier for your application. It is
generated by NetSuite. You must include this value in your HTTP header and application verification
code.
■ Partner Account - Each customer's account ID for your application. Each customer may need to enter
this value after installation of the SuiteSignOn bundle. This value is not necessary if your integrated
application does not require this value for identification. Be sure to include instructions for this task in
your bundle documentation, if necessary.
■ Web Services Access - Level of access supported for SOAP web services callbacks from integrated
applications. The following options are available:
□ Same as UI Role - the default, which allows SOAP web services callbacks from integrated
applications with the same level of permissions as in the user interface integration.
□ No Access - prevents integrated applications from accessing NetSuite through SOAP web services
callbacks.
□ Additional options for any roles designated as Web Services Only in the account. Selecting one of
these roles allows SOAP web services callbacks from integrated applications, but limits access to
the permissions levels assigned to the selected role.
As a security best practice, you should provide the minimum level of access required for SuiteSignOn
integrated applications. For example, if an application only requires user interface integration, it is best
to set the Web Services Access option to No Access.
The Web Services Access field is also available for viewing and editing on the SuiteSignOn list page at
Setup > Integration > SuiteSignOn.
Authentication Guide
Creating SuiteSignOn Records 122
After you have set basic definitions for the SuiteSignOn integration, you can define one or more
connection points where your application is displayed in the NetSuite user interface, and user
identification fields that are used as context for the integration.
Note: For examples of HTTP header and application verification code, see SuiteSignOn
Definitions, Parameters, and Code Samples.
To set up connection points for your application, define the following on the SuiteSignOn page:
■ URL - Enter the URL for the external application landing page to be displayed in the connection point.
This page must be secure, with an https:// URL. SuiteSignOn is not supported for http:// sites. You can
specify a different URL for each connection point.
■ Integration Variables - You can optionally define one or more field values to be passed as context in
the initial HTTP call from NetSuite to your application, before authentication. For an example of this
call, see NetSuite HTTP Outbound Call.
□ You do not need to specify integration variables if context is included in the URL.
□ Both static and dynamic field values are supported.
▬ To specify a static value, use a format like q=value, as in the following examples:
customer_id=12345
first=John
last=Smith
mid=Jay
▬ To specify a dynamic value, use a format like q={field_id}, as in the following examples:
customer_id ={id}
first={firstname}
last= {lastname}
mid = {middlename}
▬ To specify a null value, use a format like q=
□ Variables can include spaces. Static variables cannot include commas within values.
□ You can use comma-separated values or carriage return-separated values to specify multiple
values.
□ You cannot use social security numbers, passwords, or credit card numbers as integration
variables, because of the potential security risks. If you do so, they will not be returned.
□ For subtab connection points, standard and custom fields on the form for the specified record type
can be used as integration variables. You cannot use fields that are not included on the form. If a
referenced field has no value, no value is passed as an integration variable.
□ For portlet, Suitelet, and user event connection points, see Defining Integration Variables for
Connection Points. This section provides detailed information regarding the use of static and
dynamic integration variables in these connection points.
■ Display Type - Choose Subtab, Portlet, Suitelet, or User Event.
■ Display Context - Choose the name of the subtab, portlet, Suitelet, or user event script to be used for
SuiteSignOn access.
Authentication Guide
Creating SuiteSignOn Records 123
A subtab, portlet script, Suitelet, or user event script must already exist in your account to be included
in the dropdown list. See Creating a Custom Subtab Connection Point, Creating a Portlet Connection
Point, Creating a Suitelet Connection Point, and Creating a User Event Connection Point.
■ Record Type - (Subtabs only) Choose the record type for each subtab connection point. Custom record
types are available for their associated subtabs.
If you want to display the external application in a custom subtab on multiple record types (for
example, on contacts, customers, and partners), you must add multiple connection points, with the
same Display Type and Display Context, and a different Record Type for each.
Note: Be sure to click Add after you enter each connection point.
Note: If you want to define dynamic integration variables for either of these connection types,
you must do so in the portlet, Suitelet, or user event JavaScript file. You cannot define dynamic
integration variables in the Integration Variables field on the SuiteSignOn record.
The following code sample shows a portlet script that is used to get the email address of the currently
logged-in NetSuite user. The value of the email address can then be passed to the URL as a dynamic
integration variable.
/**
*@NApiVersion 2.x
*@NScriptType Portlet
*/
define(['N/runtime','N/sso'], function(runtime, sso) {
function render(context) {
context.portlet.title = 'My Integrated Application!!';
var email = runtime.getCurrentUser().email;
var url = sso.generateSuiteSignOnToken({suiteSignOnId: 'customsso_myApp'});
url = url + '&partner=NetSuite' + '&email=' + email;
var content = '<iframe src="'+url+'" align="center" style="width: 100%;height: 600px; margin:0;border:0;padding:0"></
iframe>';
context.portlet.html = content;
}
return {
render: render
};
});
The following screenshot shows that you could have used the Integration Variables field on the
SuiteSignOn record to define the partner integration variable, which is static. You could not have used
the Integration Variables field to define a dynamic integration variable, such as the email variable in the
preceding script.
Authentication Guide
Creating SuiteSignOn Records 124
fields’ values are passed in XML format in the HTTP response from NetSuite to your application after
verification. For an example, see NetSuite HTTP Verify Call Response.
The following user identification fields are provided on the SuiteSignOn page:
To uniquely identify each user across all NetSuite accounts, you should use one of the following two
combinations of data:
You also can make custom entity fields available on the SuiteSignOn record, by checking the Available
to SuiteSignOn box on the Custom Entity Field record. See Using Custom Fields as SuiteSignOn User
Identification.
Important: In addition to any custom fields that you choose to include, every user should be
identified by a unique combination of data defined in standard NetSuite fields. For details on the
two combinations that are supported, see Choosing User Identification Fields for SuiteSignOn.
Authentication Guide
Creating SuiteSignOn Records 125
3. Check the Available to SuiteSignOn box. After this box is checked, the custom field is listed on the
User Identification subtab of the SuiteSignOn page.
■ Check Box
■ Currency
■ Decimal
■ Email Address
■ Free-Form Text
■ Hyperlink
■ Integer
■ Percent
■ Phone Number
■ Text Area
For instructions for setting up custom fields, see the help topic Creating a Custom Field.
You must determine a way for account administrators to populate custom field values, either through
manual entry, mass update, CSV import, or another import process. You should provide instructions for
this task in your SuiteSignOn bundle documentation. If you want values to be populated through CSV
import, you can save an import map and include it in the bundle. See the help topics Working with Saved
CSV Imports and Creating a SuiteSignOn Bundle.
After the field is populated, subsequent connections into the third-party application will bypass the initial
landing page and the identity of the user is known. For this approach to work, the role of the logged-in
user in NetSuite should have permission to update their own entity record to set the custom field.
If the logged in user's role does not have the permission to update the entity record, a custom record can
be created to track identity mappings for a certain SuiteSignOn integration. Another entity custom field
that is available to SuiteSignOn can source the mapping from the custom record.
For instructions for setting up custom fields, in the NetSuite Help Center see the help topic Creating a
Custom Field. For instruction on creating custom records, see the help topic Custom Records.
Authentication Guide
Creating SuiteSignOn Connection Points 126
Currently, custom subtabs, custom portlets, Suitelets, and user event scripts are supported as connection
points.
Note: Calls initiated by SOAP web services are not supported by SuiteSignOn.
The type of connection point you create depends on how you want NetSuite users to access the
integrated application.
See Comparing Subtab, Portlet, Suitelet and User Event Connection Points to help you decide which type
of connection point best suits your implementation.
Important: Only a Suitelet connection point is supported for SuiteSignOn access from your
web store.
■ Subtab connection points may be simplest to implement, because they do not require scripting.
■ A portlet connection point provides greater flexibility than a subtab in how the application looks. A
Suitelet provides even more flexibility.
■ A Suitelet is the only connection point supported for SuiteSignOn access from your web store.
■ A user event connection point provides integration with an external application without exposing it in
the NetSuite user interface.
Required NetSuite Creation of a custom Custom scripting Custom scripting Custom scripting
customizations subtab. No scripting required. required. required.
required.
Availability on Visible within Can be added Link can be added to Not exposed in user
dashboard specifically defined to any page that any page menu. interface. Connection is
records. allows custom initiated either Before
portlets. Automatically Load, Before Submit,
Automatically available available after or After Submit, based
after bundle installed. Not available until bundle installed. on the user event script
custom portlet record function.
is added and
Authentication Guide
Creating SuiteSignOn Connection Points 127
Ability to modify Very limited. External Based on script, so Based on script, so Not exposed in user
application “look and application landing can be free-form. can be free-form. interface.
feel” page displayed within
iFrame is only subtab
contents.
Required connection Must define a separate One connection Must define a Must define a separate
point definitions connection point point can provide separate connection connection point for each
for each subtab integration in point for each integration.
integration. multiple portlets. Suitelet integration.
■ Transaction — Can be displayed on transaction records such as sales order, cash sale, opportunity
■ Entity — Can be displayed on entity records such as customer, vendor, employee
■ Item — Can be displayed on item records such as inventory, non-inventory, assembly/bill of materials
■ CRM — Can be displayed on CRM records such as task, phone call, event
■ Custom Record Subtab — Can be displayed on its associated custom record
Note: For a complete list of transaction, entity, item, and CRM records that support custom
subtabs, see the help topic Creating Custom Subtabs in the NetSuite Help Center.
After you have created a custom subtab, you can define it as a connection point on the SuiteSignOn
page. For each subtab connection point, you can specify a single record type to which it applies. The
subtab is displayed on that record type's forms. When the record that includes the subtab is loaded, the
SuiteSignOn connection is initiated, resulting in the display of an iFrame rendering your application.
Authentication Guide
Creating SuiteSignOn Connection Points 128
■ Usually, you must add at least one custom field to a custom subtab for it to display on forms.
However, subtabs that are defined as SuiteSignOn connection points do not require any
custom fields. You should not add any fields to these subtabs.
■ You can control the records to which a subtab is applied when you set up subtab connection
points on the SuiteSignOn page. See Creating SuiteSignOn Records.
■ You can limit the users who have access to each record type subtab by customizing the record
type form and setting up preferred forms for users.
■ For a description of the differences between different types of connection points, see
Comparing Subtab, Portlet, Suitelet and User Event Connection Points.
For more information, see the following topics in the NetSuite Help Center:
■ Portlet Scripts
■ Running SuiteScript 1.0 in NetSuite Overview
■ nlapiOutboundSSO(id)
Authentication Guide
Creating SuiteSignOn Connection Points 129
Important: Only a Suitelet connection point is supported for SuiteSignOn access from your
web store.
Important: The external system's access to NetSuite is limited to the access available for the
user who performed the action that caused user event script execution.
To make a user event script available for a SuiteSignOn connection point, you must create a JavaScript file,
create a NetSuite script record, and deploy the script.
Authentication Guide
Editing SuiteSignOn Records 130
If you make changes to a SuiteSignOn record after it has been bundled and distributed, you must update
the bundle in the source account, and inform bundle users of the change, so they can update their
installations to get the latest version.
Note: The SuiteSignOn records in a sandbox account that were copied from your production
account after the sandbox refresh, does not have the Change ID button.
Authentication Guide
Creating a SuiteSignOn Bundle 131
Saved CSV Import If integration uses custom fields as integration variables or user identification, and you
want to provide a predefined import mapping for populating these fields' values
You also should include bundle documentation, a file that provides instructions for account
administrators who install the bundle.
SuiteSignOn bundles are customization bundles, not configuration bundles. For more information, see
the help topic SuiteApp Creation and Distribution.
Note: The Web Services Access option in a bundled SuiteSignOn record is pushed to target
accounts as part of new bundle installations. However, a change to this option is not pushed to
target accounts during bundle updates, to prevent overwriting account administrators' choices.
Warning: NetSuite administrators should exercise caution when integrating with third-party
applications using SuiteSignOn. Some integrations may require access to, or even modify, some
data in your NetSuite account. Make sure you review the data requirements and understand what
kind of information is accessed, retrieved, modified, or deleted by the third-party system. NetSuite
has no control, responsibility, or liability regarding any third-party applications, even if NetSuite
offers resale and integration options for customers' convenience. You use and integrate with third-
party applications at your sole risk.
Summary of tasks:
1. Enable SuiteSignOn-related features (see SuiteSignOn Required Features).
2. Install a SuiteSignOn bundle (see Installing a SuiteSignOn Bundle).
Authentication Guide
Making SuiteSignOn Integrations Available to Users 132
3. Complete the implementation tasks required for making the third-party application available to
NetSuite users (see Completing Account Setup for SuiteSignOn).
Note: The tasks mentioned here are aimed at account administrators. If you are an application
provider and want to create a SuiteSignOn integration, see Setting Up SuiteSignOn Integration.
The bundle documentation file should include instructions for these tasks. If you have not yet reviewed
this file, go to Customization > SuiteBundler > Search & Install Bundles > List, and on the Installed Bundles
page, click Documentation.
You should follow the instructions in this file. The list below describes tasks that are likely to be included in
this file:
1. Go to Customization > SuiteBundler > SuiteSignOn, click the link for the newly installed
SuiteSignOn integration, and verify that the SuiteSignOn page looks correct. The bundle
documentation should include a checklist or a screenshot for you to use for this purpose.
2. Make changes to the SuiteSignOn page as necessary. You must have the SuiteSignOn permission
to edit SuiteSignOn records.
■ If your account ID for the application provider is required for identification, enter it in the
Partner Account field. This value is not necessary if the integrated application does not use it
for identification. The bundle documentation should indicate whether this value is required.
■ If you want to control the level of NetSuite access for SOAP web services callbacks from
integrated applications, change the Web Services Access option. The following options are
available:
□ Same as UI Role - the default, which allows SOAP web services callbacks from integrated
applications with the same level of permissions as in the user interface integration.
□ No Access - prevents integrated applications from accessing NetSuite through SOAP web
services callbacks.
□ Additional options for any SOAP web services only roles in the account - selecting one of
these roles allows SOAP web services callbacks from integrated applications, but limits
access to the permissions levels assigned to the selected role.
Authentication Guide
Making SuiteSignOn Integrations Available to Users 133
As a security best practice, you should provide the minimum level of access required for
SuiteSignOn integrated applications. For example, if an application only requires user interface
integration, it is best to set the Web Services Access option to No Access.
This field is also available for viewing and editing on the SuiteSignOn list page at Setup >
Integration > SuiteSignOn.
Important: Be aware that changing the Web Services Access option could possibly
break an integration, because some integrations may depend on existing user
permissions.
■ If the bundle includes custom fields to be used as user identification, ensure that they appear
on the User Identification subtab and are checked. The bundle documentation should indicate
whether these fields are included.
Be aware that the names of bundled custom fields may be changed slightly from those listed
in the bundle documentation, if any of their IDs conflict with preexisting custom fields in
your account. If a conflict is detected, the bundled custom field ID is appended with “_#”. For
example, if a bundle installs a custom field with an ID of custentitybanana and a preexisting
custom field has the same ID, the bundled field ID is changed to custentitybanana_2. This
field ID also is changed where it is referenced in SuiteSignOn setup information, either in the
Integration Variables field, or on the User Identification subtab.
Warning: NetSuite administrators should exercise caution when integrating with third-
party applications using SuiteSignOn. Some integrations may require access to, or even
modify, some data in your NetSuite account. Make sure you review the data requirements
and understand what kind of information is accessed, retrieved, modified, or deleted
by the third-party system. NetSuite has no control, responsibility, or liability regarding
any third-party applications, even if NetSuite offers resale and integration options for
customers' convenience. You use and integrate with third-party applications at your sole
risk.
3. You may need to populate values for custom fields used for user identification, through manual
entry, mass update, CSV import, or another import process. Follow the bundle documentation
instructions for this task.
4. If any portlet connection points are included, you must:
■ add one or more custom portlets that display the specified scripts to your dashboard and
publish it to other users,
or:
■ provide instructions to users for adding custom portlets to their own dashboards.
See Adding Custom Portlets for SuiteSignOn.
5. If you do not want a subtab connection point to be available to all users with access to the
specified record type, you can create a custom form that hides the subtab, define this custom
form as preferred for some users, and restrict their access to other forms for that record type. See
the help topics Creating Custom Entry and Transaction Forms and Defining Preferred Entry and
Transaction Forms.
Authentication Guide
Making SuiteSignOn Integrations Available to Users 134
■ Add a custom portlet to your own dashboard and publish it to users. This option provides you with
greater control.
See the help topic Publishing Dashboards Overview. Be aware that you can only publish a dashboard
to users with the same center as you, so you may need to log in with multiple roles and repeatedly add
the custom portlet to multiple dashboards to make the portlet available to users with different centers.
■ Provide users with instructions for adding a custom portlet to their dashboards.
Consumer Key Globally unique identifier of the consumer, generated by NetSuite. Consumer Key
Shared Secret Password used to establish ownership of the Consumer Key, Consumer Secret
entered by the Consumer when setting up the SuiteSignOn
connection.
The shared secret has a 1-1 relationship with the Consumer Key.
Authentication Guide
SuiteSignOn Definitions, Parameters, and Code Samples 135
User Individual who has logged into NetSuite and initiated activity User
between the consumer and NetSuite.
1. NetSuite HTTP Outbound Call sends the token and any context information to the external
application.
2. External Application HTTP Verify Call returns the token and sends other required parameters to
NetSuite.
This call requires an Authorization header in the OAuth 1.0 format.
3. NetSuite HTTP Verify Call Response sends user identity information in XML format to the external
application.
GET /SSO/demoApp.php?oauth_token=05016d16126a7a6c554656421e242310060807051b17ee54e6d26986d8aa&dc=001&env=PRODUCTION&systemDo
main=https%3A%2F%2F<accountID>.app.netsuite.com&webserviceDomain=https%3A%2F%2F<webservicesdomain>app.netsuite.com HTTP/1.1
Host: externalsystem.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
■ This call uses the GET method to send a generated token to the external application.
■ The external application, not the local host, is the host.
■ This call includes a systemDomain and an webservicesDomain parameter. The values of the systemDomain
and webservicesDomain parameters are provided by NetSuite.
Warning: The outbound HTTP call still includes a dc and an env URL parameters, but you
should not use them. Using the hard-coded mapping between the dc parameter and the URL
might cause problems when your account is moved to a different data center that is missing in
your mapping.
■ This call also may include context information, if integration variables have been defined for the
connection point on the NetSuite SuiteSignOn page. customer_id=970 is an example of an integration
variable. It could be included as a URL parameter, as follows:
GET /SSO/demoApp.php?oauth_token=05016d16126a7a6c554656421e242310060807051b17ee54e6d26986d8aa
&customer_id=970&dc=001&env=PRODUCTION&systemDomain=https%3A%2F%2F<accountID>.app.netsuite.com&webserviceDomain=https%3A%2F
%2F<webservicesdomain>app.netsuite.com HTTP/1.1
■ URL parameters are separated by the ampersand (&). You must ensure that your code properly parses
these parameters. Your code should not rely on the number or order of URL parameters, as these are
subject to change.
Authentication Guide
SuiteSignOn Definitions, Parameters, and Code Samples 136
Note: You should use HMAC-SHA256, as it is the most secure signature option. You can also use
HMAC-SHA1. PLAINTEXT is supported.
Be aware of the following, as shown in the example of the HTTP verify call:
Note: For a description of the OAuth 1.0 protocol and signature validation, see the OAuth 1.0
Protocol, RFC 5849.
Field Description
oauth_consumer_key A globally unique identifier for the application provider, generated by NetSuite when
the integration is set up on the SuiteSignOn page.
oauth_signature_method HMAC-SHA256 and HMAC-SHA1 are supported signature methods for ssoapplistener
calls.
oauth_signature The signature is computed based on chosen signature method. Refer to the OAuth
specification. Go to https://tools.ietf.org/html/rfc5849#section-3.4.
See Generate the Signature for the OAuth Header for Outbound SSO for more
information.
The token secret mentioned in the OAuth 1.0 specification is an empty string, so the
hashing key is:
Authentication Guide
SuiteSignOn Definitions, Parameters, and Code Samples 137
Field Description
The shared secret should be percent-encoded.
The shared secret is a password used to establish ownership of the Consumer Key
generated by NetSuite. This value is included in the signature passed in your HTTP
header, and needs to be referenced in your application verification code. For more
information about the shared secret, see Notes about Modifying the Shared Secret.
oauth_timestamp The number of seconds since January 1, 1970 00:00:00 GMT. The timestamp value
must be a positive integer and must be equal to or greater than the timestamp used in
previous verify calls.
oauth_nonce A random number that is unique across verify calls with the same timestamp value.
Generate the Signature for the OAuth Header for Outbound SSO
Some users have difficulty understanding how to construct a signature for the Authorization header. This
is the header used in the External Application HTTP Verify Call.
For more information about generating the signature, see Troubleshooting SuiteSignOn (Outbound SSO)
$url = "https://<accountID>.app.netsuite.com/app/common/integration/ssoapplistener.nl"
$oauth_consumer_key="6OtBtQV4nmEOQKpw"
$oauth_consumer_secret= "P@ssw0rd 123"; //shared secret
$oauth_token="030f6c1d1b6b106c6b445655477e72571343502efefc809d"
$oauth_nonce="kPeHzQpN6bZXsWu5w2nm"
$oauth_timestamp="1490706743"
$oauth_signature_method="HMAC-SHA256"
$oauth_version="1.0"
This example uses the PHP OAuth library. For more information, see https://tools.ietf.org/html/
rfc5849#section-3.4.1.
For more information, see Create the Base String Manually in Troubleshooting SuiteSignOn
(Outbound SSO).
2. The signature key is used to sign the base string in the HMAC-SHA algorithm. The key is
constructed from the URL-encoded value for the consumer secret, with the ampersand character
(&) as the delimiter.
3. The signature is a base64 encoded value of the HMAC-SHA, where the message is Base String
and key is the key from the previous step.
Authentication Guide
SuiteSignOn Definitions, Parameters, and Code Samples 138
HTTP/1.1 200 OK
Date: Tue, 16 Apr 2016 13:30:41 GMT
Server: Apache/2.2.17
Set-Cookie: lastUser=1326288_79_3; expires=Tuesday, 23-Apr-2016 13:30:42 GMT; path=/
Set-Cookie: NS_VER=2015.2.0; domain=<accountID>.app.netsuite.com; path=/
X-Powered-By: Servlet/2.5 JSP/2.1
P3P: CP="CAO PSAa OUR BUS PUR"
Vary: User-Agent
Connection: close
Content-Type: text/html; charset=utf-8
■ The domain set in the cookie is the same as the Host value in the external application HTTP
verify call.
■ The XML element formatting of fields is as name/value pairs, with element names formatted as
follows: <ENTITYFIELDID> for standard fields, and <FIELDID> for custom fields.
Authentication Guide
Troubleshooting SuiteSignOn (Outbound SSO) 139
The error codes and meanings are defined in the following table.
parameter_rejected The same parameter was sent Examine the oauth_parameters_rejected parameter
multiple times. for more information on which parameter was
rejected.
signature_invalid The request was not signed See Generate a Signature for the correct method of
correctly. signing a request.
signature_method_rejected The algorithm used to create The only supported algorithms are:
signature is not supported.
■ You should use HMAC-SHA256, as it is the most
secure signature option.
■ You can use HMAC-SHA1
■ PLAINTEXT is supported.
version_rejected The oauth_version is unknown. The only accepted value for oauth_version is 1.0.
Authentication Guide
Troubleshooting SuiteSignOn (Outbound SSO) 140
Note: The values defined in this section are the values used in the examples in the following
sections.
Generate a Signature
Some users have difficulty constructing a valid signature. There are many ways to generate a signature
for SuiteSignOn (Outbound SSO). This is one example of how to do it correctly.
The following sections describe how to correctly create a signature. There are PHP examples for each
step.
Note: All encoding in SuiteSignOn (Outbound SSO) is percent-encoding. For more information
about percent-encoding, go to (https://tools.ietf.org/html/rfc5849#section-3.6). The examples in
this section use PHP rawurlencode.
$url = 'https://<accountID>.app.netsuite.com/app/common/integration/ssoapplistener.nl';
$httpMethod = 'GET';
$tokenKey = '030e6a121766126c6b445655477e7252517c395926f3430a';
$tokenSecret = ''; //Outbound SSO does not use token secret
$consumerKey = 'VutaTaro1ktGNXKD';
$consumerSecret = 'S3cr3t P@ssw0rd'; //In UI called "Shared secret"
$signatureMethod = 'HMAC-SHA256'; //or HMAC-SHA1 or PLAINTEXT
$nonce = 'fjaLirsIcCGVZWzBX0pg'; //substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0,
20);
$timestamp = '1508242306'; //time();
$version = '1.0';
Note: This step is not needed when using PLAINTEXT as a signature method.
GET&https%3A%2F%2F<accountID>.app.netsuite.com%2Fapp%2Fcommon%2Fintegration%2Fssoapplistener.nl&oauth_consumer_key%3DVutaTaro1k
tGNXKD%26oauth_nonce%3DfjaLirsIcCGVZWzBX0pg%26oauth_signature_method%3DHMAC-SHA256%26oauth_timestamp%3D1508242306%26oauth_to
ken%3D030e6a121766126c6b445655477e7252517c395926f3430a%26oauth_version%3D1.0
Authentication Guide
Troubleshooting SuiteSignOn (Outbound SSO) 141
Note: The examples use the oauth library. The command for installing the library is sudo pecl
install oauth. See https://tools.ietf.org/html/rfc5849#section-3.4.1 for more information on the
signature base string.
The signature key is used to sign the base string in the HMAC-SHA algorithm. The key is constructed from
the URL-encoded values for:
Step 3: Signature
HMAC-SHA
The signature is a base64 value of the HMAC-SHA, where the message is Base String and key is the key
from the previous step.
PP1VMUdgDJeSkeNwJ8EqjKowOVddSWy9JqRT3WQJWck=
6nMUbMdr0cssfVDo0YmsBelwnpo=
PLAINTEXT
Signature PLAINTEXT
$signature = $key;
S3cr3t%20P%40ssw0rd&
Authentication Guide
Troubleshooting SuiteSignOn (Outbound SSO) 142
Important: Each parameter must be percent-encoded. The examples in this section use PHP
rawurlencode.
Header
Authentication Guide
Troubleshooting SuiteSignOn (Outbound SSO) 143
Note: Constructing a Base String is not necessary if you are using PLAINTEXT as the signature
method. However, rather than PLAINTEXT, you should use HMAC-SHA256, as it is the most secure
signature option or you can use or HMAC-SHA1.
The values used in the following code samples are defined in the section Troubleshooting the
SuiteSignOn Signature.
Note: POST parameters are used only with content type application/x-www-form-urlencoded.
Authentication Guide
Troubleshooting SuiteSignOn (Outbound SSO) 144
function restletBaseString($httpMethod, $url, $consumerKey, $tokenKey, $nonce, $timestamp, $version, $signatureMethod, $postParams)
{
//http method must be upper case
$baseString = strtoupper($httpMethod) .'&';
//include url without parameters, schema and hostname must be lower case
if (strpos($url, '?')){
$baseUrl = substr($url, 0, strpos($url, '?'));
$getParams = substr($url, strpos($url, '?') + 1);
} else {
$baseUrl = $url;
$getParams = "";
}
$hostname = strtolower(substr($baseUrl, 0, strpos($baseUrl, '/', 10)));
$path = substr($baseUrl, strpos($baseUrl, '/', 10));
$baseUrl = $hostname . $path;
$baseString .= rawurlencode($baseUrl) .'&';
//all oauth and get params. First they are decoded, next alphabetically sorted, next each key and values is encoded and finally whole parameters are
encoded
$params = array();
$params['oauth_consumer_key'] = array($consumerKey);
$params['oauth_token'] = array($tokenKey);
$params['oauth_nonce'] = array($nonce);
$params['oauth_timestamp'] = array($timestamp);
$params['oauth_signature_method'] = array($signatureMethod);
$params['oauth_version'] = array($version);
Authentication Guide
Troubleshooting SuiteSignOn (Outbound SSO) 145
$paramString = "";
foreach ($params as $key => $valueArray){
//all values must be alphabetically sorted
sort($valueArray);
foreach ($valueArray as $value){
$paramString .= rawurlencode($key) . '='. rawurlencode($value) .'&';
}
}
$paramString = substr($paramString, 0, -1);
$baseString .= rawurlencode($paramString);
return $baseString;
}
Authentication Guide
Inbound Single Sign-on 146
Warning: This Inbound SSO feature is targeted for deprecation. The deprecation schedule is as
follows:
■ Targeted to occur as of the 2020.1 upgrade, customers will no longer be permitted to use this
Inbound SSO feature to create new solutions.
■ Targeted to occur before the 2021.1 release, customers should migrate their existing solutions
to use a different single sign-on solution:
□ Use the OpenID Connect (OIDC) Single Sign-on feature released with 2019.2. See OpenID
Connect (OIDC) Single Sign-on.
□ Another alternative is to use the SAML Single Sign-on feature to access NetSuite. See SAML
Single Sign-on.
You can temporarily disable the Inbound SSO feature for testing purposes. For more information,
see Disable Inbound Single Sign-on for Testing Purposes Before Deprecation.
■ Customers, who want to integrate their own NetSuite data with an external application's data.
■ Application providers, who want to integrate customer data stored in their data center with their
customers' NetSuite data.
With inbound single sign-on, authentication information from the external application is passed to
NetSuite through an encrypted token, and a dynamically constructed URL redirects users from the
external site to a NetSuite landing page. A mapping between each user's external credentials and their
NetSuite credentials is created, either through a SOAP web services operation or through the user's login
to NetSuite on their first single sign-on access.
To implement inbound single sign-on from your site to NetSuite, you must set up a trust relationship, with
OpenSSL encryption keys, between your application and NetSuite. These keys are used to produce and
interpret encrypted tokens. You also must write application code that dynamically constructs the redirect
URL for each inbound single sign-on user. HTTP POST requests are not supported. NetSuite provides a
downloadable kit with tools you can use for these tasks.
Authentication Guide
Inbound Single Sign-on 147
Important: As of 2018.1, new solutions using Inbound SSO for SOAP web services are not
supported. Use Token-based Authentication (TBA) instead when creating new inbound SSO
solutions for SOAP web services.
For guidance on adapting an integration to include TBA credentials and to see an example that
includes code snippets and SOAP headers, see the help topic Token-Based Authentication Details.
With TBA, you use the TokenPassport complex type to send credentials. The TokenPassport
references the TokenPassportSignature complex type, another important element in the token-
based authentication process. See the help topic TokenPassport Complex Type;
For more information about using token-based authentication with web services, see the following
topics:
1. Review this guide, including the following, to ensure that the NetSuite inbound single sign-on
feature will meet your needs.
■ For an overview of how inbound single sign-on works, see Understanding Inbound Single Sign-
on.
■ For instructions for setting up and implementing an inbound single sign-on integration, see
Setting Up Inbound Single Sign-on. This section includes the following information:
□ Initial Setup for the Inbound Single Sign-on Feature
□ Implementing Inbound Single Sign-on in an External Application
□ Generating Keys Using OpenSSL
□ Creating the Initial Mapping of the Administrator Role for Inbound Single Sign-on
□ Creating Single Sign-on Code Using SSOUrl
■ For instructions for setting up inbound single sign-on mappings, see Mapping Users and Roles
for Inbound Single Sign-on Access to NetSuite
■ For technical background, see Technical Summary of Inbound Single Sign-on.
2. Be aware of the following:
■ Inbound single sign-on access is supported for the NetSuite application, including the Customer
Center, and for NetSuite web stores.
□ Using the Administrator role to log in to a web store is not supported.
Authentication Guide
Inbound Single Sign-on 148
□ If a user must access both Customer Center and non-Customer Center roles, they must have
at least two mappings.
□ Separate mappings are required for each Customer Center role.
■ Inbound single sign-on access to the Customer Center is supported for NetSuite users classified
as customers and for customer contacts.
□ If a user must access both Customer Center and non-Customer Center roles, they must have
at least two mappings.
□ Separate mappings are required for each Customer Center role.
■ Inbound single sign-on access to NetSuite respects IP address restriction rules. For information
about this feature, see Enabling and Creating IP Address Rules.
■ Inbound single sign-on access to web store is supported for custom checkout domains, multi-
site implementations, and sites customized with SSP applications. Access is also supported for
Reference Cart & One Page Checkout, the NetSuite reference implementation of the web store
checkout process. See the help topic Inbound Single Sign-on Access to Web Store.
3. After you have confirmed that you want to implement inbound single sign-on, contact your account
manager to purchase the feature.
Warning: This Inbound SSO feature is targeted for deprecation. The deprecation schedule is as
follows:
■ Targeted to occur as of the 2020.1 upgrade, customers will no longer be permitted to use this
Inbound SSO feature to create new solutions.
■ Targeted to occur before the 2021.1 release, customers should migrate their existing solutions
to use a different single sign-on solution:
□ Use the OpenID Connect (OIDC) Single Sign-on feature released with 2019.2. See OpenID
Connect (OIDC) Single Sign-on.
□ Another alternative is to use the SAML Single Sign-on feature to access NetSuite. See SAML
Single Sign-on.
You can temporarily disable the Inbound SSO feature for testing purposes. For more information,
see Disable Inbound Single Sign-on for Testing Purposes Before Deprecation.
Important: As of 2018.1, new solutions using Inbound SSO for SOAP web services are no
longer supported. Use Token-based Authentication (TBA) instead when creating new inbound SSO
solutions for SOAP web services.
For guidance on adapting an integration to include TBA credentials and to see an example that includes
code snippets and SOAP headers, see the help topic Token-Based Authentication Details.
With TBA, you use the TokenPassport complex type to send credentials. The TokenPassport references
the TokenPassportSignature complex type, another important element in the token-based authentication
process. See the help topic TokenPassport Complex Type;
Authentication Guide
Inbound Single Sign-on Overview 149
For more information about using token-based authentication with web services, see the following topics:
■ Targeted to occur as of the 2020.1 upgrade, customers will no longer be permitted to use this
Inbound SSO feature to create new solutions.
■ Targeted to occur before the 2021.1 release, customers should migrate their existing solutions
to use a different single sign-on solution:
□ Use the OpenID Connect (OIDC) Single Sign-on feature released with 2019.2. See OpenID
Connect (OIDC) Single Sign-on.
□ Another alternative is to use the SAML Single Sign-on feature to access NetSuite. See SAML
Single Sign-on.
You can temporarily disable the Inbound SSO feature for testing purposes. For more information,
see Disable Inbound Single Sign-on for Testing Purposes Before Deprecation.
The NetSuite inbound single sign-on feature enables users to move directly from an external user-
authenticating web application to NetSuite without additional authentication. This feature provides token-
based integration.
The external application uses an encrypted token to pass the user's identity to NetSuite, NetSuite verifies
the token, then logs in the user. This single sign-on mechanism can be implemented through a link in the
external application user interface, or through SOAP web services calls that use the ssoLogin operation.
Authentication Guide
Understanding Inbound Single Sign-on 150
■ Targeted to occur as of the 2020.1 upgrade, customers will no longer be permitted to use this
Inbound SSO feature to create new solutions.
■ Targeted to occur before the 2021.1 release, customers should migrate their existing solutions
to use a different single sign-on solution:
□ Use the OpenID Connect (OIDC) Single Sign-on feature released with 2019.2. See OpenID
Connect (OIDC) Single Sign-on.
□ Another alternative is to use the SAML Single Sign-on feature to access NetSuite. See SAML
Single Sign-on.
You can temporarily disable the Inbound SSO feature for testing purposes. For more information,
see Disable Inbound Single Sign-on for Testing Purposes Before Deprecation.
The following steps outline how inbound single sign-on to NetSuite works.
1. In most cases, a user initiates inbound single sign-on access to NetSuite by clicking a link in
an authenticated area of an external site. This site can be used in conjunction with either the
NetSuite application user interface or a NetSuite web store.
Note: Using the Administrator role to log in to a web store is not supported.
Alternatively, the SOAP web services ssoLogin operation can be used to initiate inbound single
sign-on access programmatically.
Important: As of 2018.1, new solutions using Inbound SSO for SOAP web services are
no longer supported. Use Token-based Authentication (TBA) instead when creating new
inbound SSO solutions for SOAP web services.
For guidance on adapting an integration to include TBA credentials and to see an example that
includes code snippets and SOAP headers, see the help topic Token-Based Authentication Details.
With TBA, you use the TokenPassport complex type to send credentials. The TokenPassport
references the TokenPassportSignature complex type, another important element in the token-
based authentication process. See the help topic TokenPassport Complex Type;
Authentication Guide
Understanding Inbound Single Sign-on 151
For more information about using token-based authentication with web services, see the
following topics:
■ Requirements for Using Token-Based Authentication
■ Regenerating a Consumer Key and Secret
■ SOAP Web Services Governance for Token-Based Authentication
■ The Three-Step TBA Authorization Flow
2. When a user initiates inbound single sign-on access, the external application produces a token
that includes the following information:
■ the user's external application company ID
This value is a string used by the external application to determine the company with which a
user is associated, for example ABCAutoParts. It cannot contain spaces.
■ the user's external application user ID
This value is a string used by the external application as a user identifier, for example
John.Smith. It cannot contain spaces.
■ the current timestamp
The timestamp string is a decimal representation of the number of milliseconds since January
1, 1970, 00:00:00 GMT.
For more information about the token, see the following topics:
■ Tables of Single Sign-on Redirect URL Parameters
■ Elements of the Authentication Token String
■ Example Inbound Single Sign-on Token
3. The external application encrypts the information included in the token.
■ To encrypt the token, the external application must have access to a private key generated
using OpenSSL. To interpret the encrypted token, NetSuite must have access to a public key
extracted from this private key.
■ The inbound single sign-on kit includes Java classes you can use to produce the private and
public keys. For instructions, see Generating Keys Using OpenSSL.
4. After encryption of the token, the external application causes the user's browser to perform a
redirect to NetSuite. HTTP POST requests are not supported.
■ The redirect is either to the NetSuite application or to the web store, based on the target set in
the code (either app or site ).
■ The redirect uses a URL constructed specifically for this inbound single sign-on access. This
URL includes required parameters such as:
□ a hex-encoded, encrypted string representing the token
□ the unique partner ID assigned by NetSuite Customer Support
□ For NetSuite application access only, the remote company ID, which is the company ID
used in the token
□ For web store access only, the domain, NetSuite company ID, and site ID
Note: For more information on required and optional parameters, see Tables of
Single Sign-on Redirect URL Parameters.
■ This URL is valid for up to 15 minutes after the timestamp included in the encrypted token.
Authentication Guide
Understanding Inbound Single Sign-on 152
■ The inbound single sign-on kit includes a Java class you can use to create code that
dynamically constructs this URL. For instructions, see Creating Single Sign-on Code Using
SSOUrl.
5. NetSuite receives the token. Based on a unique partner ID assigned by NetSuite when inbound
single sign-on is set up, NetSuite determines the public key that should be used to decrypt the
token. After the token is decrypted, if the timestamp is valid, the request is honored.
6. NetSuite checks for a user mapping between the external application and NetSuite.
■ If there is an existing mapping, the user is logged in as defined by the mapping.
■ If a mapping does not exist, the user is prompted to provide NetSuite credentials to create the
mapping.
Important: A user with an Administrator role must create the initial mapping from the
external application to NetSuite. For more information, see Creating the Initial Mapping of
the Administrator Role for Inbound Single Sign-on.
Authentication Guide
Setting Up Inbound Single Sign-on 153
■ Targeted to occur as of the 2020.1 upgrade, customers will no longer be permitted to use this
Inbound SSO feature to create new solutions.
■ Targeted to occur before the 2021.1 release, customers should migrate their existing solutions
to use a different single sign-on solution:
□ Use the OpenID Connect (OIDC) Single Sign-on feature released with 2019.2. See OpenID
Connect (OIDC) Single Sign-on.
□ Another alternative is to use the SAML Single Sign-on feature to access NetSuite. See SAML
Single Sign-on.
You can temporarily disable the Inbound SSO feature for testing purposes. For more information,
see Disable Inbound Single Sign-on for Testing Purposes Before Deprecation.
Important: As of 2018.1, new solutions using Inbound SSO for SOAP web services are no
longer supported. Use Token-based Authentication (TBA) instead when creating new inbound SSO
solutions for SOAP web services.
For guidance on adapting an integration to include TBA credentials and to see an example that includes
code snippets and SOAP headers, see the help topic Token-Based Authentication Details.
With TBA, you use the TokenPassport complex type to send credentials. The TokenPassport references
the TokenPassportSignature complex type, another important element in the token-based authentication
process. See the help topic TokenPassport Complex Type;
For more information about using token-based authentication with web services, see the following topics:
Authentication Guide
Setting Up Inbound Single Sign-on 154
Note: It is not necessary to purchase the NetSuite Inbound Single Sign-on feature if you want to
implement SAML Single Sign-on in NetSuite. For more information, see SAML Single Sign-on. See
also Alternate Inbound Single Sign-on Mechanisms.
To complete the initial setup of the inbound single sign-on feature in your account:
1. Contact your account representative to purchase the inbound single sign-on feature.
Important: As of 2018.1, new solutions using Inbound SSO for SOAP web services are
no longer supported. Use Token-based Authentication (TBA) instead when creating new
inbound SSO solutions for SOAP web services.
For guidance on adapting an integration to include TBA credentials and to see an example that
includes code snippets and SOAP headers, see the help topic Token-Based Authentication Details.
With TBA, you use the TokenPassport complex type to send credentials. The TokenPassport
references the TokenPassportSignature complex type, another important element in the token-
based authentication process. See the help topic TokenPassport Complex Type;
For more information about using token-based authentication with web services, see the following
topics:
■ Requirements for Using Token-Based Authentication
■ Regenerating a Consumer Key and Secret
■ SOAP Web Services Governance for Token-Based Authentication
■ The Three-Step TBA Authorization Flow
a. NetSuite Customer Support will open a new support case, and contact you for specific
information.
b. NetSuite Customer Support will ask you to generate a public and private key pair using
OpenSSL. See Generating Keys Using OpenSSL.
c. NetSuite Customer Support will ask you to provide the generated public key through the
support case.
d. NetSuite Customer Support will associate the public key with an Inbound Single Sign-on
Partner ID, and will provide this unique Partner ID to you.
2. After NetSuite Customer Support guides you through the initial setup, and provides you with your
unique Partner ID, you will be ready to implement inbound single sign-on in your application. See
Implementing Inbound Single Sign-on in an External Application.
Authentication Guide
Setting Up Inbound Single Sign-on 155
feature. Also, NetSuite Customer Support must have already guided you through the steps outlined in
Initial Setup for the Inbound Single Sign-on Feature.
You can choose any of the following options to implement inbound single sign-on from an external
application to NetSuite:
■ Add the ssov3.jar file from this kit to your Java classpath.
Note: Java developers can add the ssov3.jar to your classpath, along with the Java run-time
environment classes. Source code is also provided for developers in non-Java environments as
a template for implementation.
You need the contents of this .jar file to facilitate compilation of your single sign-on integration code
and to generate keys for token encryption.
■ Write application code that dynamically constructs redirect URLs to be used when users initiate
inbound single sign-on access. HTTP POST requests are not supported. See Creating Single Sign-on
Code Using SSOUrl.
■ Write SOAP web services code for the single sign-on integration as needed.
You can programmatically initiate access with ssoLogin, and/or programmatically map users' external
credentials to NetSuite credentials. See SOAP Web Services Single Sign-on Operations.
■ Provide error handling for status codes returned from NetSuite inbound single sign-on sessions. See
Error Handling for Inbound Single Sign-on.
■ To prevent single sign-on users from directly logging in to NetSuite, create a custom role that is
designated as Single Sign-on Only, and assign this role to single sign-on users. See Setting Up a
Single Sign-on Only Role.
■ Targeted to occur as of the 2020.1 upgrade, customers will no longer be permitted to use this
Inbound SSO feature to create new solutions.
■ Targeted to occur before the 2021.1 release, customers should migrate their existing solutions
to use a different single sign-on solution:
□ Use the OpenID Connect (OIDC) Single Sign-on feature released with 2019.2. See OpenID
Connect (OIDC) Single Sign-on.
□ Another alternative is to use the SAML Single Sign-on feature to access NetSuite. See SAML
Single Sign-on.
You can temporarily disable the Inbound SSO feature for testing purposes. For more information,
see Disable Inbound Single Sign-on for Testing Purposes Before Deprecation.
As described in the section Initial Setup for the Inbound Single Sign-on Feature, NetSuite Customer
Support will ask you to generate a public and private key pair using OpenSSL. The public key is
Authentication Guide
Setting Up Inbound Single Sign-on 156
provided to NetSuite, for use in creating your unique Partner ID. You will use the private key in your
implementation to encrypt authentication tokens.
1. Either append the openssl subdirectory provided in the inbound single sign-on kit to your PATH, or
download source code from http://www.openssl.org/source.
The binaries included in the openssl directory are derived from openssl0.9.6.tar.gz. If you are
creating your own binaries from a downloaded source package, follow directions in the INSTALL
file appropriate to your operating system.
2. After openssl is installed and in your PATH, type openssl to get the following prompt:
OpenSSL>
5. Extract the public key from the private key using the Priv2Pub class provided by NetSuite, by typing
the following command:
java com.netledger.forpartners.encryption.Priv2Pub
<privKey.der> <pubKey.der>
■ <privKey.der> and <pubKey.der> of this last command are your public and private keys.
Authentication Guide
Setting Up Inbound Single Sign-on 157
Note: As described in the section Initial Setup for the Inbound Single Sign-on Feature,
you will provide the public key to NetSuite Customer Support through the support case.
Maintain the private key for use by the NetSuite SSOUrl class. See Creating Single Sign-on
Code Using SSOUrl.
■ Targeted to occur as of the 2020.1 upgrade, customers will no longer be permitted to use this
Inbound SSO feature to create new solutions.
■ Targeted to occur before the 2021.1 release, customers should migrate their existing solutions
to use a different single sign-on solution:
□ Use the OpenID Connect (OIDC) Single Sign-on feature released with 2019.2. See OpenID
Connect (OIDC) Single Sign-on.
□ Another alternative is to use the SAML Single Sign-on feature to access NetSuite. See SAML
Single Sign-on.
You can temporarily disable the Inbound SSO feature for testing purposes. For more information,
see Disable Inbound Single Sign-on for Testing Purposes Before Deprecation.
The initial single sign-on account mapping must be a mapping to an Administrator role in NetSuite. This
Administrator role mapping serves as authorization that NetSuite trusts the external authentication
system. This requirement gives NetSuite administrators control over when single sign-on functionality is
available to their users.
Note: The following procedure assumes that you have completed all tasks as described in the
Initial Setup for the Inbound Single Sign-on Feature and Generating Keys Using OpenSSL topics.
(You have added the ssov3.jar file from the inbound single sign-on kit to your Java classpath,
NetSuite Customer Support has assisted with the generation of the public and private keys, and
NetSuite Customer Support has provided you with the Partner ID for this account.)
A user with an Administrator role in this account must create the initial mapping between NetSuite and
the external authentication system. To generate the token necessary to complete the initial mapping,
you can use the tool included in the Inbound Single Sign-on kit to generate the URL. The URL includes
the token necessary for the following procedure. The initial mapping process can be built in to your
application to provide users with a smoother user experience (that is, by using an embedded browser to
finish the mapping).
Note: You cannot use the SOAP web services mapSso operation to create the mapping for an
Administrator role.
Authentication Guide
Setting Up Inbound Single Sign-on 158
Note: The token is valid for 15 minutes. You must complete the following steps before the
token expires, or generate a new token.
4. Copy and paste the URL into your browser’s address bar and click Enter. The NetSuite Partner
Login page displays.
5. On the NetSuite Partner Login page, enter your NetSuite email address and password.
6. Click Log in. The NetSuite Choose a role to create the mapping page displays.
7. Click your Administrator role for this account.
Note: If you have Administrator roles in more than one account, ensure you are selecting
the correct Administrator role for this specific account.
After the initial mapping is completed, other users and roles can now be mapped to the external
application. The SOAP web services mapSso operation can be used to create the account mappings
for multiple users so that they are available before users initiate single sign-on access. (This method of
mapping is required for web store access.)
Authentication Guide
Setting Up Inbound Single Sign-on 159
Note: Using the Administrator role to log in to a web store is not supported.
■ Targeted to occur as of the 2020.1 upgrade, customers will no longer be permitted to use this
Inbound SSO feature to create new solutions.
■ Targeted to occur before the 2021.1 release, customers should migrate their existing solutions
to use a different single sign-on solution:
□ Use the OpenID Connect (OIDC) Single Sign-on feature released with 2019.2. See OpenID
Connect (OIDC) Single Sign-on.
□ Another alternative is to use the SAML Single Sign-on feature to access NetSuite. See SAML
Single Sign-on.
You can temporarily disable the Inbound SSO feature for testing purposes. For more information,
see Disable Inbound Single Sign-on for Testing Purposes Before Deprecation.
The quickest way to create inbound single sign-on code is to use the SSOUrl Java class provided in
the downloadable kit. This class is available to you after you have downloaded the kit and added the
ssov3.jar file to your Java classpath.
The SSOUrl.java file provides a template for Java code, along with explanatory comments. You can use
this file to guide your creation of single sign-on integration code in Java. A command-line utility that you
can run from a shell is also provided as an alternative.
Note: If you are NOT using the NetSuite SSOUrl class to generate redirect URLs, then you
will need to construct them using your own methods from the base elements described in
SSOUrl.java.
If you are using the SSOUrl class to implement inbound single sign-on integration, your application code
needs to do the following:
■ Initialize the SSOUrl class with the file name of the private key used to encrypt the authentication
token.
■ Set the target of the inbound single sign-on access to either the NetSuite application (app) or the web
store (site), so that the base URL for the integration is correctly generated:
□ for the NetSuite application:
https://system.netsuite.com/app/login/secure/sso.nl
https://checkout.mycompanystore.com/app/site/backend/sitesso.nl
https://checkout.netsuite.com/app/site/backend/sitesso.nl
https://checkout.na1.netsuite.com/app/site/backend/sitesso.nl
Authentication Guide
Setting Up Inbound Single Sign-on 160
https://checkout.na2.netsuite.com/app/site/backend/sitesso.nl
■ For inbound single sign-on access to web store, set the domain for your web store.
□ If you have a custom checkout domain, set the domain appropriately.
□ If you are using a NetSuite-hosted checkout domain, set it to the appropriate checkout domain for
your data center. The NetSuite company ID and site ID URL parameters are also required for web
store access. For more information, see Web Store Access Only Parameters.
■ Provide the single sign-on link as a link to an internal page that uses the SSOUrl.getURL(companyId,
userId) method to dynamically construct a redirect URL to a landing page in the NetSuite application
or web store. This URL should include all required parameters and any desired optional parameters.
HTTP POST requests are not supported.
■ Redirect the browser to the constructed URL.
Note: Using the Administrator role to log in to a web store is not supported.
Warning: This Inbound SSO feature is targeted for deprecation. The deprecation schedule is as
follows:
■ Targeted to occur as of the 2020.1 upgrade, customers will no longer be permitted to use this
Inbound SSO feature to create new solutions.
■ Targeted to occur before the 2021.1 release, customers should migrate their existing solutions
to use a different single sign-on solution:
□ Use the OpenID Connect (OIDC) Single Sign-on feature released with 2019.2. See OpenID
Connect (OIDC) Single Sign-on.
□ Another alternative is to use the SAML Single Sign-on feature to access NetSuite. See SAML
Single Sign-on.
You can temporarily disable the Inbound SSO feature for testing purposes. For more information,
see Disable Inbound Single Sign-on for Testing Purposes Before Deprecation.
The following tables describe the parameters used in single sign-on redirect URLs. HTTP POST requests
are not supported.
Review all of the tables to ensure that you are including all of the parameters required for your purposes.
■ For further insight into parameter usage, review the contents of the SSOUrl.java file.
Authentication Guide
Setting Up Inbound Single Sign-on 161
■ For example redirect URLs, see Example Single Sign-on Token and Redirect URLs.
Note: Using the Administrator role to log in to a web store is not supported.
Defaults are:
Authentication Guide
Setting Up Inbound Single Sign-on 162
<companyID><space><userID><space><timestamp>
The companyID and userID elements represent the credentials used by the external application. (These
credentials will be mapped to the NetSuite identity during inbound single sign-on.) Because spaces are
used to delimit subtokens, companyID and userID elements cannot contain spaces.
■ The companyID element is used by the external application to determine the company with which a
user is associated, for example, ABCAutoParts. The companyID that you should use can vary. The goal is
to ensure that the application token string is unique.
□ If you are a partner building an application for another company, the companyID should be a unique
identifier of that company. You could use the company’s name, or any identifier you use to identify
that company.
□ If you are building an integration for your own company, use your company name.
□ In any case, you can always use the NetSuite account ID as the companyID. To locate the account ID,
go to Setup > Company > Setup Tasks > Company Information. The account ID field is located near
the bottom of the right column.
■ The userID string used by the external application as a user identifier, for example, John.Smith. It
cannot contain spaces.
■ The timestamp string is a decimal representation of the number of milliseconds since January 1, 1970,
00:00:00 GMT. The token is valid for 15 minutes after the timestamp contained in it.
Authentication Guide
Setting Up Inbound Single Sign-on 163
Important: Always specify the NetSuite-hosted checkout domains (including the correct data
center) in addition to the c parameter for faster routing if the performance of the login operation
is a concern.
Note: Using the Administrator role to log in to a web store is not supported.
■ NA West: checkout.netsuite.com
■ NA East: checkout.na1.netsuite.com
Authentication Guide
Setting Up Inbound Single Sign-on 164
■ NA Northwest: checkout.na2.netsuite.com
■ NA Central: checkout.na3.netsuite.com
■ EU West: checkout.eu1.netsuite.com
■ EU Central: checkout.eu2.netsuite.com
Note: A site ID of 1 is valid for a single site as well as for a multi-site environment.
■ Targeted to occur as of the 2020.1 upgrade, customers will no longer be permitted to use this
Inbound SSO feature to create new solutions.
■ Targeted to occur before the 2021.1 release, customers should migrate their existing solutions
to use a different single sign-on solution:
□ Use the OpenID Connect (OIDC) Single Sign-on feature released with 2019.2. See OpenID
Connect (OIDC) Single Sign-on.
□ Another alternative is to use the SAML Single Sign-on feature to access NetSuite. See SAML
Single Sign-on.
You can temporarily disable the Inbound SSO feature for testing purposes. For more information,
see Disable Inbound Single Sign-on for Testing Purposes Before Deprecation.
Review the following examples to get a better understanding of inbound single sign-on tokens and
redirect URLs:
For details about the parameters used in redirect URLs, see Tables of Single Sign-on Redirect URL
Parameters.
Authentication Guide
Setting Up Inbound Single Sign-on 165
The token is then encrypted using a private key, and then hex-encoded so it can be passed as a redirect
URL parameter.
Note: The hex-encoded, encrypted token string that is used as the URL parameter.
57E1A7DA1CD637E6BD1F6D7AF3F9EE96B0DE6D1E0D337678606BE4448760CEC5D249031CA0B4618EB50C731703DDE27150F663C7AC11D3B4CE
B84329DB2EBE58FE1D16520FF3271476F069C31DD0BCDA0AAFB4BEF1C3EC0F7DD98579D7314F6A0AD5B3D22AD1A2E766E471B0FA22B1BFEDE4Br58Fr
r315EC3C7BC1C65CFA9A37
https://system.netsuite.com/app/login/secure/sso.nl?pid=198765&pacct=ABCAutoParts&puid=John.Smith&a=57E1A7DA1CD637E6B
D1F6D7AF3F9EE96B0DE6D1E0D337678606BE4448760CEC5D249031CA0B4618EB50C731703DDE27150F663C7AC11D3B4CEB84329DB2EBE58FE1D16520F
F3271476F069C31DD0BCDA0AAFB4BEF1C3EC0F7DD98579D7314F6A0AD5B3D22AD1A2E766E471B0FA22B1BFEDE4Br58Frr315EC3C7BC1C65CFA9A37
The base URL in the redirect URL is determined by the target set in integration code; in this case, the
target is set to app.
Values for the URL parameters in this example also are set in integration code: the partner ID ( pid ), the
remote company id ( pacct ), the remote user ID ( puid ), and the hex-encoded encrypted token string ( a ).
Important: The parameters listed above are valid parameters for this use case. For more
information, see the Tables of Single Sign-on Redirect URL Parameters.
Do not use the ck and cktime parameters described in the Example Redirect URL for
Intermediate Third-party Login to Web Store.
The following is an example redirect URL for inbound single sign-on access to the web store:
https://checkout.netsuite.com/app/site/backend/sitesso.nl?a=57E1A7DA1CD637E6B
D1F6D7AF3F9EE96B0DE6D1E0D337678606BE4448760CEC5D249031CA0B4618EB50C731703DDE27150F663C7AC11D3B4CEB84329DB2EBE58FE1D16520F
F3271476F069C31DD0BCDA0AAFB4BEF1C3EC0F7DD98579D7314F6A0AD5B3D22AD1A2E766E471B0FA22B1BFEDE4Br58Frr315EC3C7BC1C65C
FA9A37&pid=198765&hideloginpage=T&returnurl=http://www.abcautoparts.com/&c=198765&n=1
Authentication Guide
Setting Up Inbound Single Sign-on 166
The base URL in the redirect URL is determined by the target set in integration code; in this case, the
target is set to site.
Values for the URL parameters in this example also are set in integration code: the hex-encoded
encrypted token string ( a ), the partner ID ( pid ), the hide login page indicator ( hideloginpage ), the
return URL ( returnurl ), the NetSuite-assigned company ID ( c ), and the site id ( n ).
Important: The parameters listed above are valid parameters for this use case. For more
information, see the Tables of Single Sign-on Redirect URL Parameters.
Do not use the ck and cktime parameters described in the Example Redirect URL for
Intermediate Third-party Login to Web Store.
Note: Using the Administrator role to log in to a web store is not supported.
Inbound single sign-on supports the workflow where a customer visits a NetSuite shopping site, adds an
item to the cart, clicks the Checkout button, and then is directed to a third-party site for login. As shown in
the diagram below, after logging into the third-party site, the customer is directed to NetSuite checkout
servers to complete a transaction.
To ensure that the shopping cart contents persist to the NetSuite checkout servers, parameters that
allow the checkout servers to determine the original session must be included in the single sign-on call to
NetSuite.
Important: The ck and cktime parameters described in the following procedure should only be
used in situations when there is an intermediate third-party login required before proceeding to
the Web Store.
To ensure synchronization between the NetSuite web store checkout server and
the shopping server:
1. Include two additional parameters, ck and cktime, in the customized checkout link pointing to
third-party servers for login. You can include these parameters by using tags in the customization
text.
Authentication Guide
Setting Up Inbound Single Sign-on 167
You might, for example, put the tags directly into the URL you are substituting for the checkout
URL as:
2. Upon receiving these parameters on the third-party login resource, read them, and then save them
for addition to the URL to which the customer is redirected for single sign-on after login at the
third-party site.
Example:
https://checkout.netsuite.com/app/site/backend/sitesso.nl?landingurl=http%3A
%2F%2Fshopping.f.netsuite.com%2Fs.nl%3Fc%3D1035737&pid=1&c=1035737&a=792C4B61E
F9BE695E9E9375FD78D24F25200EDEEF01A416B03A2AAC41EE0E2C31F4503D33F0E7FED1C154BFD559B7AC9D8E1B9DE4B9882D4F
F9488DB11867BCE03B1A91C93881B09F1FB99B0837BA0642CB58EA8B9839308503DF3ADDE3DD3F22ED37704D7C30171871C6439E0F69B
CA49C6DAA2B5B1D2651490B6FA4E3FA4BB&ck
=rBDDSzm-AdboaPPb&cktime=114233
The base URL in the redirect URL is determined by the target set in integration code; in this case, the
target is set to site.
Values for the URL parameters in this example also are set in integration code: the page that first displays
for inbound single sign-on access ( landingurl ), the partner ID ( pid ), the NetSuite-assigned company ID
( c ), the hex-encoded encrypted token string ( a ), the shopperid ( ck ), and a time stamp ( cktime ).
Important: The parameters listed above are valid parameters for this use case. For more
information, see the Tables of Single Sign-on Redirect URL Parameters. The ck and cktime
parameters are additional parameters valid for this use case only.
■ Targeted to occur as of the 2020.1 upgrade, customers will no longer be permitted to use this
Inbound SSO feature to create new solutions.
■ Targeted to occur before the 2021.1 release, customers should migrate their existing solutions
to use a different single sign-on solution:
□ Use the OpenID Connect (OIDC) Single Sign-on feature released with 2019.2. See OpenID
Connect (OIDC) Single Sign-on.
□ Another alternative is to use the SAML Single Sign-on feature to access NetSuite. See SAML
Single Sign-on.
You can temporarily disable the Inbound SSO feature for testing purposes. For more information,
see Disable Inbound Single Sign-on for Testing Purposes Before Deprecation.
Important: As of 2018.1, new solutions using Inbound SSO for SOAP web services are no
longer supported. Use Token-based Authentication (TBA) instead when creating new inbound SSO
solutions for SOAP web services.
For guidance on adapting an integration to include TBA credentials and to see an example that includes
code snippets and SOAP headers, see the help topic Token-Based Authentication Details.
Authentication Guide
Setting Up Inbound Single Sign-on 168
With TBA, you use the TokenPassport complex type to send credentials. The TokenPassport references
the TokenPassportSignature complex type, another important element in the token-based authentication
process. See the help topic TokenPassport Complex Type;
For more information about using token-based authentication with web services, see the following topics:
The SOAP web services mapSso operation provides the ability to automate the mapping between users'
external application credentials and NetSuite credentials.
■ This operation provides inbound single sign-on access to NetSuite without users having to log in to
NetSuite the first time this access occurs. Instead of the mapping between their external application
credentials and NetSuite credentials being created at the time of this login, the mapping is created
through SOAP web services.
■ Use of this operation is required for inbound single sign-on access to the web store.
Note: Using the Administrator role to log in to a web store is not supported.
■ This operation is applicable to accounts that have inbound single sign-on set up, and that have access
to the associated external application credentials and encryption keys needed to generate the token.
■ For more information, see the SOAP web services mapSso topic, which includes code samples.
Single sign-on mappings are not copied from a production account to a sandbox account when the
sandbox is refreshed. These mappings must be recreated in the sandbox account for any users who
require inbound single sign-on access to that account.
The SOAP web services login operation provides a mechanism for external applications to automate
inbound single sign-on user login to NetSuite without the user's NetSuite credentials going through the
external servers.
■ This operation provides inbound single sign-on access to NetSuite without users having to click a link
in the external application. The activities that occur when a user clicks this type of link instead occur
behind the scenes.
■ This operation is applicable to users who authenticate to NetSuite through the SOAP web services
login operation; it is not applicable to users who authenticate to NetSuite by providing user
credentials in the header of their SOAP requests.
■ For more information, see the SOAP web services ssoLogin topic, which includes code samples.
Authentication Guide
Setting Up Inbound Single Sign-on 169
Important: NetSuite hosts customer accounts in multiple data centers. For that reason,
the correct URL for SOAP web services access varies depending on the data center hosting
the account. Your integration must incorporate logic that dynamically determines the correct
URL. With the 2012.2 and later endpoints, you should use the getDataCenterUrls operation to
dynamically discover the correct URL. With older endpoints, you should use the REST roles service.
For details, see the help topic The REST Roles Service.
Warning: This Inbound SSO feature is targeted for deprecation. The deprecation schedule is as
follows:
■ Targeted to occur as of the 2020.1 upgrade, customers will no longer be permitted to use this
Inbound SSO feature to create new solutions.
■ Targeted to occur before the 2021.1 release, customers should migrate their existing solutions
to use a different single sign-on solution:
□ Use the OpenID Connect (OIDC) Single Sign-on feature released with 2019.2. See OpenID
Connect (OIDC) Single Sign-on.
□ Another alternative is to use the SAML Single Sign-on feature to access NetSuite. See SAML
Single Sign-on.
You can temporarily disable the Inbound SSO feature for testing purposes. For more information,
see Disable Inbound Single Sign-on for Testing Purposes Before Deprecation.
When an inbound single sign-on session is interrupted, NetSuite sends status codes to the external
application. The external site can receive each of these status codes and display an appropriate error to
the user.
■ The following status codes may be returned if the hideloginpage parameter is set to T (true): (If
hideloginpage is set to F (false), the user is redirected to the login page.)
□ LOGIN_ERR_NO_MAPPING - No SSO mapping of user authentication exists in NetSuite.
□ LOGIN_ERR_UNKNOWN - Unexpected error occurred.
□ SESSION_TIMEOUT - Session timed out in NetSuite.
Note that each inbound single sign-on token includes a timestamp, and single sign-on access is
only valid for 15 minutes.
■ The following status code may be returned independently of the hideloginpage parameter value:
Authentication Guide
Setting Up Inbound Single Sign-on 170
Warning: This Inbound SSO feature is targeted for deprecation. The deprecation schedule is as
follows:
■ Targeted to occur as of the 2020.1 upgrade, customers will no longer be permitted to use this
Inbound SSO feature to create new solutions.
■ Targeted to occur before the 2021.1 release, customers should migrate their existing solutions
to use a different single sign-on solution:
□ Use the OpenID Connect (OIDC) Single Sign-on feature released with 2019.2. See OpenID
Connect (OIDC) Single Sign-on.
□ Another alternative is to use the SAML Single Sign-on feature to access NetSuite. See SAML
Single Sign-on.
You can temporarily disable the Inbound SSO feature for testing purposes. For more information,
see Disable Inbound Single Sign-on for Testing Purposes Before Deprecation.
For security purposes, you can designate a NetSuite role as Single Sign-on Only. When a user logs in with
a role that has been designated as Single Sign-on Only, validation is performed to ensure that the user
is logging in through an inbound single sign-on mechanism. This mechanism can be either the NetSuite
certificate-based inbound single sign-on feature or OpenID single sign-on feature.
The Single Sign-on Only role supports strict control of credentials from the external application. This type
of role increases the security of an integrated application by prohibiting a SOAP web services or UI user
from accessing the system with permissions and privileges that are specifically created for inbound single
sign-on access only.
Important: You cannot use NetSuite for Outlook with a Single Sign-on Only role. Users who are
not sure whether their role is compatible with NetSuite for Outlook should contact their account
administrator.
For details about setting up roles in NetSuite, see the help topic Customizing or Creating NetSuite Roles.
Authentication Guide
Setting Up Inbound Single Sign-on 171
■ Targeted to occur as of the 2020.1 upgrade, customers will no longer be permitted to use this
Inbound SSO feature to create new solutions.
■ Targeted to occur before the 2021.1 release, customers should migrate their existing solutions
to use a different single sign-on solution:
□ Use the OpenID Connect (OIDC) Single Sign-on feature released with 2019.2. See OpenID
Connect (OIDC) Single Sign-on.
□ Another alternative is to use the SAML Single Sign-on feature to access NetSuite. See SAML
Single Sign-on.
You can temporarily disable the Inbound SSO feature for testing purposes. For more information,
see Disable Inbound Single Sign-on for Testing Purposes Before Deprecation.
NetSuite verifies a user's identity by comparing the remote system credentials passed in the token
(company ID and user ID) to their NetSuite credentials (email, password, account, and role used to log
in to NetSuite). To allow for this comparison and verification, the remote system credentials must be
associated with, or mapped to, the NetSuite credentials. This mapping stores a permanent association
between the user's external application identity and their NetSuite identity.
The initial single sign-on account mapping must be to an Administrator role in NetSuite. This
administrator mapping serves as authorization that NetSuite trusts the external authentication system.
This requirement gives NetSuite administrators control over when single sign-on functionality is available
to their users. See Creating the Initial Mapping of the Administrator Role for Inbound Single Sign-on for
more information.
Note: Using the Administrator role to log in to a web store is not supported.
■ For web store access, the administrator is required to use the SOAP web services mapSso operation to
create the account mappings for multiple users so that they are available before users initiate single
sign-on access.
□ If a user must access both Customer Center and non-Customer Center roles, they must have at
least two mappings.
□ Separate mappings are required for each Customer Center role.
■ For NetSuite access, the administrator can use the SOAP web services mapSso operation to create the
account mappings for multiple users, or can instruct users to create their own mappings.
Note: The mapSso operation is a SOAP web services operation. To use SOAP web services, you
must enable the feature in NetSuite. In addition, the role being mapped must include the SOAP
web services permission set to Full. See Enabling the Web Services Feature and Assigning the Web
Services Permission to a Role for more information.
If the administrator does not create mappings for users' external credentials and NetSuite credentials,
users are required to create these mappings when they first log in with a role that requires single sign-on
Authentication Guide
Setting Up Inbound Single Sign-on 172
access. (This method of mapping is not supported for web store access.) See Creating Your Mapping for
Inbound Single Sign-on to the NetSuite UI
■ If a NetSuite role used for inbound single sign-on access is deleted, the single sign-on mapping for any
user with that role is automatically remapped to another role.
■ If a user has a single sign-on mapping set up with a particular role and that role is removed from the
user, the mapping is deleted. You can set up a new mapping for that user with a different role.
■ There is no limit to the number of mappings you can create. The only limitation is that for each
mapping the combination of the partner ID, partner account, and user id must be unique.
■ Single sign-on mappings are not copied from a production account to a sandbox account when the
sandbox is refreshed, or from one sandbox account to another. These mappings must be recreated in
each sandbox account for any users who require inbound single sign-on access to that account.
Note: If a user requires single sign-on access for multiple accounts, you must use a different
partner account-remote company ID for each single sign-on mapping for that user. For more
information, see NetSuite Application Access Only Parameters.
□ If a user must access both Customer Center and non-Customer Center roles, they must have at
least two mappings.
□ Separate mappings are required for each Customer Center role.
Note: This procedure is only for mapping access to the NetSuite application (the UI). The
mapping for access to a web store must be completed by an account administrator using the
mapSso operation.
To create your mapping for inbound single sign-on to the NetSuite UI:
1. Log in to the external application to be used for inbound single-sign-on access to NetSuite.
2. Click the link to go to the NetSuite UI. The NetSuite Partner Login page displays.
3. On the NetSuite Partner Login page, enter your NetSuite email address and password.
4. Click Log in. The NetSuite Choose a role to create the mapping page displays.
5. Click the name of the role you will use for inbound single sign-on access to this account.
Note: If you have similar roles in more than one account, ensure that you are selecting
the correct role for this specific account.
The mapping is now complete. You will automatically be logged in when accessing NetSuite by
inbound single sign-on from your external application.
■ If you must access both Customer Center and non-Customer Center roles, you must have at
least two mappings.
■ Separate mappings are required for each Customer Center role.
Authentication Guide
Disable Inbound Single Sign-on for Testing Purposes Before Deprecation 173
■ Targeted to occur as of the 2020.1 upgrade, customers will no longer be permitted to use this
Inbound SSO feature to create new solutions.
■ Targeted to occur before the 2021.1 release, customers should migrate their existing solutions
to use a different single sign-on solution:
□ Use the OpenID Connect (OIDC) Single Sign-on feature released with 2019.2. See OpenID
Connect (OIDC) Single Sign-on.
□ Another alternative is to use the SAML Single Sign-on feature to access NetSuite. See SAML
Single Sign-on.
In 2020.2, you can prepare your account for deprecation of the Inbound SSO feature. You can temporarily
disable the Inbound SSO feature in your account, for testing purposes. To disable the feature, go to Setup
> Company > Setup Tasks > Enable Features. On the SuiteCloud tab, check the Disable Inbound Single
Sign-on box.
You can disable and re-enable the feature at any time.
■ Targeted to occur as of the 2020.1 upgrade, customers will no longer be permitted to use this
Inbound SSO feature to create new solutions.
■ Targeted to occur before the 2021.1 release, customers should migrate their existing solutions
to use a different single sign-on solution:
□ Use the OpenID Connect (OIDC) Single Sign-on feature released with 2019.2. See OpenID
Connect (OIDC) Single Sign-on.
□ Another alternative is to use the SAML Single Sign-on feature to access NetSuite. See SAML
Single Sign-on.
You can temporarily disable the Inbound SSO feature for testing purposes. For more information,
see Disable Inbound Single Sign-on for Testing Purposes Before Deprecation.
In the following text, system A refers to an external application, and system B refers to NetSuite.
This example discusses two systems, systems A and B, and a user that has identifiers ID A and ID B in
the respective systems. In the absence of single sign-on, A and B would each require ID and PASSWORD
Authentication Guide
Technical Summary of Inbound Single Sign-on 174
presentation for user access. In order for system A to validate the user and then use single sign-on to
redirect the user to system B, without requiring further user authentication, the following steps occur:
Authentication Guide
SAML Single Sign-on 175
The NetSuite SAML Single Sign-on feature is based on the Security Assertion Markup Language (SAML)
v2.0 specifications. For information about these specifications, click here. Any SAML 2.0-compliant
application can serve as the IdP for SAML access to NetSuite.
The SAML Single Sign-on (SSO) feature supports inbound single sign-on access to NetSuite using
authentication from a third-party IdP. This feature allows users who have logged in to an external
application to go directly to NetSuite. Users do not need to log in separately to NetSuite, because
authentication from the same IdP is used for login to both the external application and NetSuite. A user
who accesses NetSuite using SAML SSO is directed to their NetSuite Home page. NetSuite account
administrators can use role-based permissions in NetSuite to control which users have SAML SSO access
to NetSuite.
Note: SAML single sign-on access to NetSuite UI honors any IP address rules for your company,
or IP address restrictions for your employees, that you may have created in your NetSuite account.
IP address rules or restrictions do not apply for SAML access to web stores or websites.
1. In the NetSuite application, perform preliminary setup: enable the feature, create roles and assign
SSO permissions, and assign users to the roles.
2. Using the IdP of your choice: create your NetSuite Service Provider (SP) configuration. The
procedure varies depending on the IdP you choose to use.
Note: Some IDPs already have NetSuite listed among their out-of-the-box service
providers, while others require that you configure the set up of NetSuite as new SAML
Service Provider yourself.
3. In the NetSuite application, complete the SAML Setup page: create the configuration in your
account for your IdP.
If you are interested in setting up SAML SSO access to your Commerce web store, familiarize yourself with
the SAML SSO documentation in this section. Then, see the help topic SAML Single Sign-on Access to Web
Store for more information.
Authentication Guide
Complete Preliminary Steps in NetSuite for SAML SSO 176
The first steps in setting up SAML SSO are to enable the feature, create roles and assign SSO permissions,
and assign users to the roles.
Warning: By enabling the SAML Single Sign-on feature, you allow users to access
and use your NetSuite account directly from a third-party service that may not have the
same authentication and security features as NetSuite. This feature also extends NetSuite
administration of user access to the administrators of the identity management system.
You need to ensure that NetSuite account use through SAML meets all of your security,
regulatory, and other compliance obligations, including Payment Card Industry (PCI) Data
Security Standards.
Note: If a role is already designated as two–factor authentication (2FA) required, and you
add the SAML SSO permission to the role, the 2FA requirement will be ignored. The SAML SSO
permission takes precedence.
To complete the following procedure, you must be logged in to NetSuite with an Administrator role. If
you need more detailed information about creating roles in NetSuite, see the help topic Customizing or
Creating NetSuite Roles.
Authentication Guide
Complete Preliminary Steps in NetSuite for SAML SSO 177
Important: No special permission is required to grant a customer center role SAML access to
a website. The SAML permission is enabled for all customer center users, after the SAML setup for
the website is completed. For more information on center roles access, see the following: SAML
Single Sign-on Access to Web Store.
■ Set Up SAML Single Sign-on - permits users other than NetSuite account administrators to view and
edit the SAML Setup page. (The Administrator role already has this permission.)
■ SAML Single Sign-on - requires users to log in to the NetSuite UI using SAML SSO. This permission
must be explicitly assigned to a role. However, a user assigned this permission will not be able to log in
to the NetSuite UI from the standard login page with their username and password.
Important: No special permission is required to grant a customer center role SAML SSO
access to a website. After the SAML setup for a website is completed, the SAML permission is
automatically enabled for all customer center users.
For more information, see the help topic SAML Single Sign-on Access to Web Store
Both of these permissions are Setup type permissions that support only a Full access level.
Authentication Guide
Complete Preliminary Steps in NetSuite for SAML SSO 178
To provide SAML single sign-on access to users, the SAML Single Sign-on permission can be added to an
existing role that is already assigned to users. Or, a new role can be created to which this permission can
be added, and this new role can then be assigned to users.
Important: You cannot add SAML Single Sign-on permission to a role that has SuiteAnalytics
Connect permission.
Permissions are added to roles on the Role record page, available at Setup > Users/Roles > Manage Roles.
Important: After the SAML Single Sign-on permission has been assigned to a role, there is a
small delay before a user can use this role to log in using SAML single sign-on. This delay is related
to caching; the new permission is not available until after the cache has timed out.
For more information about adding permissions to roles, see the help topic Customizing or Creating
NetSuite Roles.
For example, the NetSuite account administrator role does not have SAML Single Sign-on permission
and no user can log in using SAML single sign-on as an administrator. This limitation ensures that an
administrator can always log in and resolve any problems that might occur with the third-party IdP setup
or SAML access.
Another example of a limitation is that account administrators cannot add SAML Single Sign-on
permission to a role that has SuiteAnalytics Connect permission. SAML access is not supported for
SuiteAnalytics Connect.
Some limitations are intended to ensure that the account administrator has absolute responsibility
for explicitly deciding who is allowed to access their NetSuite account using SAML Single Sign-on. The
account administrator is deciding to trust the third-party IdP to authenticate and allow access to their
NetSuite account. This is the reason for the following limitations:
■ A user who has accessed NetSuite with a role that does not have SAML Single Sign-on permission
cannot access any roles that do have SAML Single Sign-on permission.
■ As of 2018.1, it is up to an account administrator to decide whether users should be locked in a single
account. See Account Attribute for more information. (In previous releases, a user who accessed
Authentication Guide
Complete Preliminary Steps in NetSuite for SAML SSO 179
NetSuite through SAML Single Sign-on could not access any roles that belonged to a different NetSuite
account. SAML Single Sign-on access was provided to only a single account.)
Some limitations are intended to ensure there are no conflicts resulting from having two different trust
authorities (the third-party IdP and NetSuite) authenticating a single user. After SAML is enabled for
certain roles in an account, NetSuite trusts the third-party identity provider. This is the reason behind the
following limitations:
■ A user with a role that has SAML Single Sign-on permission cannot log in directly to the NetSuite user
interface using the standard NetSuite login page.
■ A user who has accessed NetSuite through SAML Single Sign-on cannot access any roles that do not
have SAML Single Sign-on permission. This prevents users from switching from a SAML role to a non-
SAML role with greater privileges.
■ Only one type of inbound single sign-on permission can be assigned to a specific role. If a role has
SAML Single Sign-on permission, it cannot have OpenID Connect (OIDC) Single Sign-on permission,
OpenID Single Sign-on permission, or be granted inbound single sign-on access through the NetSuite
Inbound Single Sign-on feature.
Important: A user with a role that has SAML Single Sign-on permission cannot log in directly to
the NetSuite user interface on the standard NetSuite login page with the SAML role.
The following procedure is for adding a role with the SAML Single Sign-on permission to users.
4. Click Edit.
5. Select your custom SAML Single Sign-on role from the list.
6. Click Add.
7. Click Save.
Authentication Guide
Complete Preliminary Steps in NetSuite for SAML SSO 180
Important: The URL shown on the SAML Setup page in the NetSuite Service Provider Metadata
field in the following screenshot is obscured, because the URL varies depending on the data
center where your account is hosted.
Note: As of May 2020, the default value for the location is set to the NetSuite system domain.
You do not have to change the configuration if we move your account to a different data center
location, or if you configure SAML SSO in multiple accounts in different data center locations.
Authentication Guide
Configure NetSuite with Your Identity Provider 181
Note: Your IdP could be a web application or an on-premises solution. The NetSuite application
could already be included in their list of SP applications. The IdP might have a setup wizard or a
manual to guide you through the process.
1. Go to your IdP website or an on-premises administration console, and follow the application setup
instructions from your IdP.
Note: You must create a new SP application for NetSuite. Refer to your IdP’s
documentation for directions on how to do this.
2. Provide the NetSuite Service Provider Metadata to your IdP by one of the following methods:
a. Upload the NetSuite SP metadata file, or:
b. Paste the URL for the NetSuite SP metadata file in the appropriate field with your IdP, or:
c. Manually configure SAML on the IdP side by copying information from specific fields in the
NetSuite Service Provider Metadata file to the IdP.
If you need instructions because you must manually upload a certificate file, see Extract an
Encryption Certificate or Signing Certificate from the SP Metadata File.
Your IdP (website or From the NetSuite Service Provider Metadata file
on-premises console)
SP Entity ID Always refer to the NetSuite Service Provider Metadata file in your
account.
Copy the SP entityID from the NetSuite Service Provider metadata file you
downloaded from the SAML Setup page your account.
The SP entityID is shown in the first line of the file.
Assertion Consumer Always refer to the NetSuite Service Provider Metadata file in your
Service account.
Copy the URL from the NetSuite Service Provider metadata file you
downloaded from the SAML Setup page in your account.
Single Logout Service Always refer to the NetSuite Service Provider Metadata file in your
account.
Copy the URL from the NetSuite Service Provider metadata file you
downloaded from the SAML Setup page in your account.
Important: Use only the value on the first line of the list:
https://system.netsuite.com/saml2/slopost
3. Your IdP also has an IdP metadata configuration file. You must copy the URL for this file, or
download the IdP metadata file. (Later, you must either enter the URL or upload the file into
NetSuite on the SAML Setup page.)
Authentication Guide
Configure NetSuite with Your Identity Provider 182
4. With your IdP, you must assign (or provision) the NetSuite application to the SAML users in your
account.
In many cases, the previous steps take care of all the information you need to provide to the IdP. For
more information about signing assertions, encryption, and SAML attributes, see IdP Metadata and SAML
Attributes.
Important: The URL link to the NetSuite Service Provider Metadata field in the following
screenshot is obscured, because the URL varies depending on the account type and your data
center location.
Note: As of May 2020, the default value for the location is set to the NetSuite system domain.
You do not have to change the configuration if we move your account to a different data center
location, or if you configure SAML SSO in multiple accounts in different data center locations.
Authentication Guide
Complete the SAML Setup Page 183
Note: To enable SAML access to a website (as opposed to the NetSuite application), you need
to complete the SAML subtab of the Web Site Setup page. See the help topic SAML Single Sign-on
Access to Web Store.
Note: This solution is not part of the SAML 2.0 standard. There is no guarantee that this will
work.
■ By default, the Primary Authentication Method option is not checked. If SAML users click a link to
access NetSuite when no active NetSuite session exists, they are redirected to the NetSuite login page.
This redirect might cause issues for users who do not know their NetSuite credentials.
■ If you check the Primary Authentication Method box, users can be redirected to the external IdP login
page. This redirect is available if:
□ the user has already been logged in, the redirect occurs based on previous experience with
NetSuite.
□ the access link includes the NetSuite account ID set as the c or compid URL parameter or as an
account-specific domain, formatted like the following:
https://system.netsuite.com/app/center/card.nl?c=<ACCOUNTID> or
https://<accountID>.app.netsuite.com/app/center/card.nl
Authentication Guide
Complete the SAML Setup Page 184
Note: If the Primary Authentication box is checked, and a user clicks a link containing the
c or compid URL parameter or the account-specific domain URL, the user is redirected to
the external IdP login page. The originally requested URL will be passed as a RelayState
parameter, in accordance with the SAML 2.0 specification. This means that the IdP can
direct the user back to the correct NetSuite resource after authentication. If there is a live
session for the IdP, the user will be directed back to the NetSuite resource without being
asked for credentials.
□ Users will be redirected to the IdP login page upon session timeouts.
On the SAML Setup page, the IdP metadata file can be specified by entering a URL or by uploading the
actual XML file. This is the information you gathered when you were setting up NetSuite with your IdP.
■ Choose Indicate IDP metadata URL and enter the location URL of the metadata file.
■ Or, choose the Upload IDP metadata File option and browse to locate the file.
Note: If you need to make changes to the IdP configuration, see Update Identity Provider
Information in NetSuite.
Authentication Guide
Update Identity Provider Information in NetSuite 185
Important: If your company uses SAML SSO in multiple accounts with a shared
configuration, see Share SAML IdP Metadata in Multiple NetSuite Accounts.
Important: This procedure removes the current IdP metadata from your NetSuite
account, deletes the information in the Logout Landing Page field, and clears the Primary
Authentication Method box.
1. Go to Setup > Integration > SAML Single Sign-on in your NetSuite account.
2. Under Actions, click Delete IDP Configuration.
Authentication Guide
Update Identity Provider Information in NetSuite 186
Note: For information on viewing or removing the identity provider metadata for SAML
access to web stores, see the help topic SAML Single Sign-on Access to Web Store.
Important: If your company uses SAML SSO in multiple accounts with a shared
configuration, see Share SAML IdP Metadata in Multiple NetSuite Accounts.
■ IdP Requirements
Authentication Guide
IdP Metadata and SAML Attributes 187
IdP Requirements
The Identity Provider metadata file should map required attributes between the identity provider and
NetSuite, so that NetSuite can accept the identity provider's SAML assertions.
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
3. Use a text editor to open the SP metadata file you saved to your computer.
4. Copy the appropriate line from the SP metadata file.
Authentication Guide
IdP Metadata and SAML Attributes 188
5. Paste the line you copied from the SP metadata file to the blank line between the -----BEGIN
CERTIFICATE----- and -----END CERTIFICATE----- lines.
NameID or email user email address Required, must use the NameID attribute or the email attribute.
Authentication Guide
IdP Metadata and SAML Attributes 189
■ Account Attribute
■ Role Attribute
■ Site Attribute
■ NameID and Email Attributes
□ Supported NameID Formats
Account Attribute
The account attribute is your NetSuite account ID. If you do not know your NetSuite account ID, a user
with an Administrator role can go to Setup > Company > Company Information to view the Account ID
field. The account attribute is optional, unless:
Important: If you send the account attribute, users are locked into a single company account,
and will not be able to switch between multiple accounts that trust the same IdP.
Role Attribute
The ability to define a role ID is particularly useful if you have a SuiteCommerce website. It is not possible
for a user to switch roles when logged in to a website. With the role attribute, you can define the SAML
role to be used for login. The role defined in the assertion is treated as a default role.
The role attribute can be passed along with the SAML assertion as an additional attribute. If the role
attribute is sent, the assertion must also include the account attribute.
Site Attribute
Setting the site attribute (the site ID) is required for web store access. If you are sending the site
attribute, you must also set the account attribute.
Note: When the site attribute is provided, the user is directed to the web store with the
corresponding site id. It is not possible to route the SAML login to either the NetSuite account or
to a web store based on the role in which the user logs in to the IdP.
The NetSuite system automatically generates and assigns IDs as the sites are created. If you do not know
the site ID:
■ For a Site Builder site, an Administrator or a user with the Set Up Company permission can go to Setup
> Site Builder > Web Site Management > Preview Web Site. The site ID is the n parameter at the end of
the URL.
The URL is in the following format:
http://shopping.<DataCenterID>.netsuite.com/s.nl?c=<accountID>&n=<siteID>.
For example, if your account was hosted in the US East data center, and your account ID was 123456,
the URL for a Site Builder site would be:
http://shopping.na1.netsuite.com/s.nl?c=123456&n=1.
Authentication Guide
IdP Metadata and SAML Attributes 190
■ For a Suite Commerce Advanced site, an Administrator or a user with the Set Up Company permission
can go to Setup > Suite Commerce Advanced > Set Up Tasks > Set Up Web Site. Click Edit for the
desired web site. In the browser address bar, the site ID is the value of the ID parameter in the URL.
The URL is in the following format:
https://<accountID>.app.netsuite.com/app/site/setup/siteadmin.nl?
id=<siteID>&sitetype=ADVANCED&e=T.
For example, if your account ID was 123456, and the site ID was 3, the URL for a Suite Commerce
Advanced site would be:
https://123456.app.netsuite.com/app/site/setup/siteadmin.nl?id=3&sitetype=ADVANCED&e=T.
Note: If using both the NameID and the email attributes, the values for these attributes must be
identical, unless you are using the transient format. If NetSuite receives a SAML Assertion with a
transient NameID, it must also contain an email attribute statement with the user email address.
The values in transient NameID tag and email attribute statement do not need to be identical.
■ emailAddress
■ transient
■ unspecified
Important: No matter which of these formats you choose to use, the NameID value must
contain an email address.
The SAML Response Example illustrates the use of the emailAddress format for NameID.
...
<saml:Subject>
<saml:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" SPNameQualifier="http://www.netsuit
e.com/sp" >[email protected]</saml:NameID>
...
<saml:AttributeStatement>
<saml:Attribute Name="email">
Authentication Guide
IdP Metadata and SAML Attributes 191
For more information on SAML SSO use with web stores, see the help topic SAML Single Sign-on Access to
Web Store.
For more information, see the Primary Authentication Method in Defining the NetSuite Configuration for
SAML.
You can configure the value of the RelayState attribute on the IdP side. However, for security reasons,
NetSuite does not support redirects to external pages (other than NetSuite pages) through RelayState
attribute in the SAML assertion.
Authentication Guide
Interactions with NetSuite Using SAML 192
Note: The following solution is not part of the SAML 2.0 standard. If SP-initiated SLO is
desired, and if your IdP supports this functionality, you could enter the Single Logout Service
URL of your IdP in the Logout Landing Page field. There is no guarantee that this will work, as it
depends on how your IdP implemented and supports the SAML SLO functionality.
This list details four important changes as a result of the Shared IdP feature:
You can use the same IdP metadata file for all your NetSuite account types: for example, your production,
sandbox, and Release Preview accounts. However, your SAML configuration is not copied from your
production account to other account types.
■ Sandbox: You must configure SAML in your sandbox account after each refresh, and the refreshed
sandbox has been activated.
■ Release Preview: You must configure SAML in your Release Preview account when it becomes
available before each new NetSuite release.
Complete the following procedure to use the same IdP in multiple NetSuite account types (for example,
your production account and a sandbox account. You must be a NetSuite account administrator or a user
with the Set Up SAML Single Sign-on permission to access the SAML Setup page.
Authentication Guide
SAML SSO in Multiple NetSuite Account Types 193
Important: Completing this procedure is only required if you want to add a new account that
shares the same configuration with your current accounts. Multiple accounts can share the same
IdP if the metadata files are identical.
For example, perhaps you currently use the same SAML metadata for your production and sandbox
accounts. You decide you want to purchase another sandbox account and want to use the same SAML
metadata in that new account. Or perhaps you want to set up SAML in your Release Preview account. You
have two options for setting up SAML and sharing SAML metadata with additional NetSuite accounts.
■ You should follow the procedure for the preferred option: Redefine the IdP configuration.
■ However, if the preferred option is not feasible for your situation, follow the Upload an existing IdP
metadata file (stored in NetSuite) to all new accounts procedure.
Important: If you do not follow one of the following procedures, you will encounter an error
message if you only attempt to upload and save a metadata configuration file obtained from your
IdP.
The following procedure is the preferred approach for sharing the same SAML configuration in multiple
NetSuite accounts.
1. In a role with the Setup SAML Single Sign-on permission, or in an Administrator role, log in to a
NetSuite account where the IdP metadata is shared.
2. Go to the SAML Setup page (Setup > Integration > Manage Authentication > SAML Single Sign-on ).
Note the value in the read-only Entity ID field.
3. On the SAML Setup page under Actions, click Delete IdP Configuration. (For more information, see
Remove the Current IdP Metadata).
Note: Make a list of all accounts from which you delete the IdP configuration file, meaning
accounts that share the same Entity ID value.
4. Repeat steps 1-3 for each account that shares the same IdP configuration file.
5. Log in to the website of your IdP.
6. Locate the IdP metadata configuration file for the NetSuite application.
7. Copy the URL for this file or download the IdP metadata file from your IdP.
Important: You must use this same file in the future when you add new accounts to
your SAML configuration. If anything changes in the IdP metadata file, the IdP configuration
must be redefined. Uploading an IdP metadata file containing any differences will generate
a SAML Metadata Warning error message in the UI.
8. Refer to the list of accounts from which you deleted the IdP metadata. Log in to each account and
go to the SAML Setup page (Setup > Integration > Manage Authentication > SAML Single Sign-on).
Either upload the IdP metadata file or point to the location (the URL) of the file from your IdP.
Authentication Guide
SAML SSO in Multiple NetSuite Account Types 194
Note: See Update the IdP Configuration File and Change Your IdP for NetSuite if you need
more information on these options.
9. Log in to any new accounts you want to configure with the same IdP metadata and go to the SAML
Setup page (Setup > Integration > Manage Authentication > SAML Single Sign-on). Either upload
the IdP metadata file or point to the location (the URL) of the file from your IdP
Use the following procedure if the recommended approach is not feasible for your situation.
Upload an existing IdP metadata file (stored in NetSuite) to all new accounts
1. In a role with the Setup SAML Single Sign-on permission, or in an Administrator role, log in to a
NetSuite account where a SAML SSO is configured. (You should log in to your production account
for this step.)
2. Go to the SAML Setup page (Setup > Integration > Manage Authentication > SAML Single Sign-on ).
3. Download the current IdP metadata file stored in NetSuite. In the Current Identity Provider section,
right-click and do a Save As of the Current Identity Provider Metadata file.
4. In a role with the Setup SAML Single Sign-on permission, or in an Administrator role, log in to the
new account you want to configure for SAML access.
5. Upload the IdP metadata file you downloaded in Step 3.
Important: Repeat this procedure (starting with Step 4) for all of the new NetSuite
accounts in which you want to share the same SAML configuration.
Note: For information about removing SAML access to NetSuite after the SAML Setup page has
been completed, see Remove SAML Access to NetSuite.
■ Either of the following actions removes SAML access to NetSuite for a user or group of users in your
account:
□ Removing the SAML Single Sign-on permission from the users' roles.
□ In extreme cases, editing the users' employee records in NetSuite to make them inactive.
Authentication Guide
Remove SAML Access to NetSuite 195
■ The following actions remove SAML access to NetSuite for all users in your account:
□ Ensure that SAML roles are either inactivated, or SAML permissions are removed from the roles.
□ Disabling the SAML Single Sign-on feature in NetSuite.
Note: You can remove identity provider metadata on the SAML Setup page. See Update Identity
Provider Information in NetSuite
For information on viewing or removing the identity provider metadata for SAML access to web
stores, see the help topic SAML Single Sign-on Access to Web Store.
When I access my NetSuite production account through SAML SSO, can I switch roles to
access my non–SAML roles in my production or sandbox accounts?
No. It is not possible to access SAML roles and non-SAML roles in the same session.
When I log in to my NetSuite production account in a non-SAML role, can I switch roles to
other non–SAML roles in my production or sandbox accounts?
Yes.
Authentication Guide
FAQ: SAML SSO 196
only supported hashing function in this specification is SHA1. The recommended signature method is
RSAwithSHA1.
Do all SAML 2.0 messages have authenticity and integrity protection using a digital
certificate?
The whole assertion message must be signed by the IDP private key and sent over HTTPS. NetSuite only
supports use of the TLS 1.2 protocol for secure communication.
Does the Response for any message that does not have authenticity and integrity
protection always indicate failure?
Yes, it does. At a minimum, NetSuite requires that an assertion be signed.
If a message or elements of a message are digitally signed, does the relying party always
validate the public key of the digital signature?
Yes, it does.
Are there any revocation checks done against the signature (such as CRL or OCSP)?
There are no automatic checks. The revocation must be done by an account administrator, by removing
an IDP’s metadata from the NetSuite account settings.
Are all SAML 2.0 messages sent through an HTTP binding using the Transport Layer
Security (TLS) protocol?
NetSuite only accepts requests sent through HTTPS (TLS). NetSuite only supports use of the TLS 1.2
protocol for secure communication.
Does the Service Provider process the InResponseTo attribute of the Response to ensure
the Response was intended for them and is still fresh?
For the SP-initiated flow, this check is included as per the SAML standard. Both IdP-initiated and SP-
initiated flows are supported. See Interactions with NetSuite Using SAML for more information.
Does the Service Provider process the Destination attribute of the Response to ensure
the Response was intended for them?
Yes, it does.
Does the Service Provider process the SubjectConfirmationData element to ensure the
Assertion was intended for them?
Yes, it does.
Does the Service Provider validate the NotOnOrAfter attribute of the Conditions element
to ensure the Assertion is still fresh?
Yes, it does.
Authentication Guide
FAQ: SAML SSO 197
Does the Service Provider process the AudienceRestrictions element to ensure the
assertion was intended for them?
Yes, it does.
Does the Service Provider process the AuthnContext element to ensure class of
Authentication?
Yes, it does.
Authentication Guide
OpenID Connect (OIDC) Single Sign-on 198
OpenID Connect (OIDC) Single Sign-on is an alternative to other single sign-on (SSO) methods currently
available in NetSuite: SAML SSO, Google OpenID SSO, and the NetSuite proprietary version of Inbound
SSO. OIDC is an identity layer on top of the OAuth 2.0 protocol. OIDC uses JavaScript Object Notation
(JSON) as the data format, and uses JSON Web Tokens (JWT) to transfer claims between parties.
Note: The NetSuite Inbound SSO and Google OpenID SSO features are targeted for deprecation.
The deprecation schedule is as follows:
■ In 2020.1, customers will no longer be permitted to create new solutions using the NetSuite
Inbound SSO feature. Existing customers using this Inbound SSO feature should adapt their
solutions to use a different SSO method before the 2021.1 release.
■ In 2020.1, customers will no longer be permitted to use the Google OpenID feature to create
new solutions. Existing customers should migrate their solutions to use the OpenID Connect
(OIDC) Single Sign-on feature, or an alternative method, such as SAML SSO, before the 2020.2
release.
1. Choose a vendor, an OpenID Connect Provider (OP) and register NetSuite with your OP as the
client, or relying party (RP). See Register NetSuite with Your OpenID Connect Provider.
2. Click the link in each of the following steps for information on how to complete the setup for the
OpenID Connect (OIDC) feature in NetSuite:
a. Enable the OpenID Connect (OIDC) Single Sign-on Feature in NetSuite.
b. Configure OpenID Connect (OIDC) in NetSuite.
c. Customize Roles for OpenID Connect and add OpenID Connect Permissions.
d. Assign the OpenID Connect Single Sign-on Role to Users.
e. Tell your users how to access NetSuite using OpenID Connect. See User Access to NetSuite
with OpenID Connect.
Authentication Guide
Register NetSuite with Your OpenID Connect Provider 199
If you are interested in setting up OpenID Connect (OIDC) access to Commerce web stores, familiarize
yourself with the OIDC documentation in this section. Then, see the help topic OpenID Connect (OIDC)
Access to Web Store.
Note: OIDC Identity Provider-initiated logout is not supported for both UI and Commerce. As of
2020.2, NetSuite supports Relying Party-initiated logout for UI.
It is not possible to provide detailed instructions for configuring NetSuite as a client or relying party (RP)
with your OIDC Provider (OP). Refer to the documentation available from your OP for configuring OpenID
Connect access. However, see the following procedure for basic guidance on what must be accomplished
to set up OpenID Connect access to NetSuite with your OP. The exact steps will vary, depending on the
vendor you select as your OP.
Warning: Using OpenID Connect Provider (OP) that is not certified might cause your OpenID
Connect (OIDC) Single Sign-on configuration to work improperly.
2. It should be possible to specify more than one URI to redirect after login if a configuration is
shared between multiple NetSuite accounts. The format for the login redirect URI is an account-
specific domain URL in the following format:
https://<accountID>.app.netsuite.com/app/login/secure/oidclogin.nl
where <accountID> is a variable representing the NetSuite account ID.
3. Ensure that the email addresses of OP users are the same as the email addresses of the NetSuite
users in your account. You must enter the email address of each NetSuite user who needs single
sign-on capability to your OP. This ensures that your users are able to access NetSuite with OIDC.
4. When you have successfully completed registration with your OP, you are provided with a Client ID
and Client Secret, as well as a Configuration URL. The format of the configuration URL is similar to
this example:
https://<OPAcctID>.<OPdomain.com>/.well-known/openid-configuration
where <OPAcctID> and <OPdomain.com> represent variables.
You will need the Client ID, Client Secret and Configuration URL values so that you can enter them
on the OpenID Connect (OIDC) Single Sign-on setup page in NetSuite.
5. Assign an application or relying party to the OP users so that they will be able to access NetSuite.
Authentication Guide
Enable the OpenID Connect (OIDC) Single Sign-on Feature in NetSuite 200
Warning: By enabling the OpenID Connect (OIDC) Single Sign-on feature, you allow users
to access and use your NetSuite account directly from a third-party service that may not have
the same authentication and security features as NetSuite. This feature also extends NetSuite
administration of user access to the administrators of the identity management system. You need
to ensure that NetSuite account use through OIDC meets all of your security, regulatory, and other
compliance obligations, including Payment Card Industry (PCI) Data Security Standards.
1. Go to Setup > Company > Setup Tasks > Enable Features and click the SuiteCloud subtab.
2. In the Manage Authentication section, check the OpenID Connect (OIDC) Single Sign-on box.
Click I Agree on the SuiteCloud Terms of Service when prompted.
3. Click Save.
1. Go to Setup > Integration > Manage Authentication > OpenID Connect (OIDC) Single Sign-on.
2. Enter the Client ID you obtained from your OP.
3. Enter the Client Secret you obtained from your OP.
4. (Optional) Enter the Post Logout Redirect URL as a valid URL value.
Important: The value of this field must match the value on OpenID Connect Provider’s
(OP) side. A user is redirected to this URL after successful logout.
Authentication Guide
Configure OpenID Connect (OIDC) in NetSuite 201
Important: If you leave this field blank, users with any email domain can access NetSuite
using OIDC. If you wish to restrict access to only specific email domains, list them in this
field.
■ For instance, if your company’s name was Example and your email domain was
example.com, you would enter:
example.com
■ However, some of your users may use different email domains to access your account.
You should add those domains also. For instance:
example.com, gmail.com, <AnotherEmailDomain>.com
6. The Set Configuration From URL option is selected by default. Enter the Configuration URL you
obtained from your OP.
Note: You should use the Set Configuration From URL option. However, if you choose
the Set Configuration Manually option, you must gather the required information for the
Issuer, Authorization Endpoint, Token Endpoint, and Certificate URL fields from your
OP. Additionally, you can gather the required information for the End Session Endpoint
field from your OP, if you want to use the Relying Party-initiated logout.
7. Click Submit.
You should see the following confirmation message in the UI: OpenID Connect (OIDC)
configuration successfully saved.
If you receive an error message, see Troubleshoot OIDC for more information.
Important: The OIDC configuration is not shared between the NetSuite application and
Commerce websites. An Administrator must configure OIDC on the SSO tab of the website’s setup
page. Website users must be assigned the OpenID Connect (OIDC) Single Sign-on permission
to log in to the website successfully. For more information, see the help topic OpenID Connect
(OIDC) Access to Web Store.
Authentication Guide
Customize Roles for OpenID Connect 202
5. On the Setup subtab, select the appropriate OIDC permission from the list, and click Add. There
are two OIDC permissions:
■ Set Up OpenID Connect (OIDC) Single Sign-on
■ OpenID Connect (OIDC) Single Sign-on
See OpenID Connect Permissions for more information.
6. Click Save.
■ Set Up OpenID Connect (OIDC) Single Sign-on - permits users other than those with an
Administrator role (NetSuite account administrators) to view and edit the OpenID Connect (OIDC)
Single Sign-on setup page. The Administrator role already has this permission.
■ OpenID Connect (OIDC) Single Sign-on - requires users to log in to the NetSuite UI using the
OpenID Connect (OIDC) Single Sign-on feature. This permission must be explicitly assigned to a role.
□ If a role is designated as Single Sign-on Only, a user assigned this permission will not be
able to log in to the NetSuite UI from the standard login page with their username and
password.
□ Users will receive notifications from NetSuite regarding password expiration. For more
information, see the help topic Password Expiration Notifications.
See OpenID Connect Permission Limitations for more information.
Both OIDC permissions are Setup type permissions that support only a Full access level.
To provide single sign-on access to users, the OpenID Connect (OIDC) Single Sign-on permission can be
added to an existing role that is already assigned to users. Or, a new role can be created to which this
permission can be added, and this new role can then be assigned to users.
Permissions are added to roles on the Role record page, available at Setup > Users/Roles > User
Management > Manage Roles.
Important: After the OpenID Connect (OIDC) Single Sign-on permission has been assigned
to a role, there is a small delay before a user can use this role to log in using the OpenID Connect
(OIDC) Single Sign-on feature. This delay is related to caching; the new permission is not available
until the cache has timed out.
For more information about adding permissions to roles, see the help topic Customizing or Creating
NetSuite Roles.
Authentication Guide
OpenID Connect Permissions 203
For example, the Administrator role does not have the OpenID Connect (OIDC) Single Sign-on
permission and no user can log in with an Administrator role using the OpenID Connect (OIDC) Single
Sign-on feature. This limitation ensures that an administrator can always log in and resolve any problems
that might occur with the OIDC Provider (OP) setup or with single sign-on access.
Another example of a limitation is that the OpenID Connect (OIDC) Single Sign-on permission cannot
be added to a role that has SuiteAnalytics Connect permission. OpenID Connect (OIDC) Single Sign-on
access is not supported for SuiteAnalytics Connect.
Some limitations are intended to ensure that the account administrator has absolute responsibility for
explicitly deciding who is allowed to access their NetSuite account using OpenID Connect (OIDC) Single
Sign-on. The account administrator is deciding to trust the OP to authenticate users and allow access to
their NetSuite account.
■ If a role is designated as Single Sign-on Only, a user with a role that has OpenID Connect (OIDC)
Single Sign-on permission cannot log in directly to the NetSuite user interface using the standard
NetSuite login page.
■ A user who has accessed NetSuite through the OpenID Connect (OIDC) Single Sign-on feature
cannot access any roles that do not have OpenID Connect Single Sign-on permission.
■ If a role has OpenID Connect (OIDC) Single Sign-on permission, it cannot also have SAML Single Sign-
on permission.
Important: If a role is marked as Single Sign-on Only, a user with a role that has OpenID
Connect (OIDC) Single Sign-on permission cannot log in directly to the NetSuite user interface
on the standard NetSuite login page.
The following procedure is for adding a role with an OpenID Connect (OIDC) Single Sign-on permission to
a user.
1. Find the appropriate entity record for the user. For an employee, go to List > Employee >
Employee.
Note: If you need to create the user in NetSuite, see the help topic Manage Different
Types of Users for links to information about setting up NetSuite access for different types
of users (Employee, Vendor, and Partner).
Authentication Guide
Assign the OpenID Connect Single Sign-on Role to Users 204
■ On the portal of the OpenID Connect Provider (OP), select NetSuite. Users are redirected to the
NetSuite Change Role page.
■ On the first login attempt, from an account-specific domain URL in one of the following formats:
https://<accountID>.app.netsuite.com/app/login/secure/oidc.nl, or
https://<accountID>.app.netsuite.com/app/login/secure/oidcprivate.nl for the Customer Center
roles,
where <accountID> is a variable representing the NetSuite account ID.
When the OIDC configuration has been completed for an account, the user is redirected to the OP’s
login form. The user enters the OP login credentials, and is redirected to the Choose Role page in
NetSuite.
The user’s roles are shown on the Change Role page. User’s should click Choose Role to select the role
with OpenID Connect (OIDC) Single Sign-on permission.
Note: After a user logged in successfully through OpenID Connect (OIDC) Single Sign-on,
the user’s preferred login method is remembered. If that user opens a deep link to a NetSuite
resource when there is no active NetSuite session, the user is redirected to the OP login form.
■ Either of the following actions removes OpenID Connect access to NetSuite for a user or group of
users in your account:
□ Removing the OpenID Connect (OIDC) Single Sign-on permission from the users' roles.
□ Editing the users' employee records in NetSuite to make a user or users inactive.
■ The following action removes OpenID Connect access to NetSuite for all users in your account:
□ Disabling the OpenID Connect (OIDC) Single Sign-on feature in NetSuite.
Troubleshoot OIDC
This section provides details about OIDC error messages users might encounter. See the following tables
for information about error messages and how to resolve them.
Authentication Guide
Troubleshoot OIDC 205
Unable to save your OpenID Causes of this error could be: To resolve this error, see
Connect (OIDC) configuration. Configure OpenID Connect (OIDC)
Please review the configuration and ■ One of the fields on the OIDC Setup in NetSuite.
correct any errors. page contains a malformed URL.
■ Verify that all URLs are valid
and entered correctly.
The URL <…> was unreachable. Causes of this error could be: To resolve this error, see
Ensure you have entered the correct Configure OpenID Connect (OIDC)
URL, or use the Set Configuration ■ The URL entered in the Configuration in NetSuite.
Manually option. URL field is unreachable for some
reason (the configuration URL is not ■ Identify the reason that the
accessible). URL is unreachable, and
■ One of the fields on the form contains resolve that problem.
a malformed URL. ■ Verify that the Configuration
URL is valid and entered
correctly.
The OpenID Connect (OIDC) Causes of this error could be: To resolve this error:
Single Sign-on feature is
not enabled in this account. ■ The OIDC feature is not ■ A user with an Administrator role or a user
Contact your NetSuite enabled. that has the Enable Features permission
account administrator. ■ The OIDC feature is enabled, should verify that the feature is enabled. See
Enable the OpenID Connect (OIDC) Single
but your OIDC setup is not
Sign-on Feature in NetSuite.
complete in NetSuite.
■ A user with an Administrator role or a user
that has the Set Up OpenID Connect (OIDC)
Single Sign-on permission should verify that
the setup is complete. See Configure OpenID
Connect (OIDC) in NetSuite.
The user <email address> Causes of this error could be: To resolve this error, a user with an
does not exist. Contact Administrator role can do the following:
your NetSuite account ■ The user successfully
administrator to provision authenticated at the OP, but the ■ If the user does not exist in NetSuite, create
the user. user does not exist in NetSuite. the user. See the help topic Manage Different
Types of Users for links to information about
setting up NetSuite access for different types
of users (Employee, Vendor, Partner, and
Authentication Guide
Troubleshoot OIDC 206
The user <email address> Causes of this error could be: To resolve this error, a user with an
does not have an assigned Administrator role can do the following:
role. Contact your NetSuite ■ The user successfully
account administrator. authenticated at the OP, and ■ If the user exists but does not have an OIDC
the user exists in NetSuite, but role, assign an OIDC role to the user. See
the user does not have a role Assign the OpenID Connect Single Sign-on
assigned in NetSuite. Role to Users. See also Customize Roles for
OpenID Connect.
The user <email address> Causes of this error could be: To resolve this error, a user with an
does not have a role with Administrator role can do the following:
OpenID Connect (OIDC) ■ The user successfully
permission. Contact authenticated at the OP, and ■ Assign an OIDC role to the user. See Assign
your NetSuite account the user exists in NetSuite, the OpenID Connect Single Sign-on Role to
administrator. but the user does not have Users. See also Customize Roles for OpenID
a role with the OpenID Connect.
Connect (OIDC) Single Sign-
on permission assigned in
NetSuite.
The user <email address> Causes of this error could be: To resolve this error, a user with an
has an email domain name Administrator role can do the following:
which is not permitted to ■ The user successfully
access < account name> authenticated at the OP, and ■ If the user’s email address is from a domain
by OpenID Connect (OIDC) the user exists in NetSuite, but that should be able to access NetSuite, go to
Single Sign-on. Contact the user’s email domain name Setup > Integration > Manage Authentication
your NetSuite account is not in the list of allowed > OpenID Connect (OIDC) Single Sign-on.
administrator. domain names that can access Enter the user’s email domain in the comma-
your NetSuite account. separated list in the Allowed Email Domains
field. See Configure OpenID Connect (OIDC)
in NetSuite.
On the Insufficient Causes of this error could be: To resolve this error:
Permissions page, users may
encounter the following error ■ The user is attempting to ■ The user can switch to an appropriate OIDC
message: access NetSuite with a role role, if one is available on the Choose Role
that does not have the OpenID list. If an appropriate role is not available, the
The role <role name> <email Connect (OIDC) Single Sign-on user must contact the account administrator.
address> you selected permission. ■ A user with an Administrator role can assign
does not have OpenID
an OIDC role with the appropriate permission
Connect (OIDC) Single Sign-
to the user. See Assign the OpenID Connect
on permission. Contact
Single Sign-on Role to Users. See also
your NetSuite account
Customize Roles for OpenID Connect.
administrator.
On the Access Disabled page, Causes of this error could be: To resolve this error:
users may encounter the
following error message: ■ The user is inactive. ■ Verify that the user is active.
■ The role is inactive. ■ Verify that the role is active.
Login access has been
disabled for this role. See Resolving the Login Access Has Been
Disabled Error.
To reactivate a user:
1. Open the appropriate record list page.
Authentication Guide
Troubleshoot OIDC 207
See the help topic Inactivating Users for information on how users are made inactive.
To reactivate a role:
1. Go to Setup > Users/Roles > Manage Roles.
2. Check the Show Inactives box at the bottom of the list.
3. In the Inactive column, clear the box next to any role you want to reactivate.
4. Click Submit.
See the help topic Inactivating Roles for information on how roles are made inactive.
Authentication Guide
OpenID Single Sign-on 208
■ Use the OpenID Connect (OIDC) Single Sign-on feature released with 2019.2. See OpenID
Connect (OIDC) Single Sign-on.
■ Another alternative is to use the SAML Single Sign-on feature for access to NetSuite. See SAML
Single Sign-on.
As of 2020.2, any solutions still using the OpenID SSO do not work.
Authentication Guide
Digital Signing 209
Digital Signing
Digital signing provides authentication of documents or messages so that the identity of the sender
and the validity of the document’s contents can be trusted. Some organizations require digital signing
of electronic documents, such as invoices, using official digital certificates. NetSuite can store digital
certificates that your company has acquired, and you can use these certificates to digitally sign your
documents. NetSuite stores these certificates securely, tracks the expiration dates of the certificates,
and reminds users with appropriate role access when a certificate's expiry date is approaching. Users in
NetSuite OneWorld accounts can upload digital certificates for multiple subsidiaries.
Note: You do not need to provide information for public certificates. NetSuite manages public
certificates for key pairing.
When digital certificates are stored in NetSuite, developers can create customizations to digitally sign
transactions, documents, or reports in XML or plain string format using SuiteScript 2.x. For example, with
SuiteScript, you can create a search for transactions that need to be digitally signed with your company
certificate before sending to the customer or vendor. Your script can iterate through the search results,
convert each transaction to XML, add an encrypted digital signature to a portion of the XML, and send the
transaction to its recipient.
Your private digital certificates are not stored in the File Cabinet but can be uploaded on the Digital
Certificates page at Setup > Company > Preferences > Certificates. Other than Administrators, only users
with custom roles that include specific permissions for certificate access can upload or access private
certificate information. For more information, see Uploading Digital Certificates and Access to Digital
Certificates.
You can manage digital signing using three SuiteScript 2.x modules:
■ N/https/clientCertificate Module
■ N/crypto/certificate Module
■ N/certificateControl Module
■ PFX
■ P12
■ PEM
Important: The certificate record holds information for a digital certificate, but it is not a
standard NetSuite record and cannot be accessed with the N/record module.
Note: Regardless of user role, you cannot download digital certificates. Depending on which
SuiteApps are installed in your account, you may see read-only system certificates in your list of
digital certificates. These certificates are required for a secure connection to a third party service
through a SuiteApp and cannot be edited or removed without uninstalling the SuiteApp.
Authentication Guide
Uploading Digital Certificates 210
Note: When testing in various environments, you must re-upload your certificate to the new
environment. For example, if you upload a certificate in your production account and refresh your
sandbox account, you must still re-upload your certificate in the sandbox account.
You can view the list of uploaded certificates on the Digital Certificates page.
■ Certificate Management — This permission controls access to the Digital Certificates page in the
NetSuite UI.
■ Certificate Access — This permission controls access through scripting. When you select a custom role
with this permission in the Execute As Role field on script deployments, the script can access the digital
certificate data for digital signing.
Note: If a certificate record has the Restrict to Employees box checked, only the selected
employees have access to that certificate. Selected employees must also have one of the role
permissions listed.
Authentication Guide
SSH Keys for SFTP 211
■ RSA
■ DSA
■ ECDSA
For more information, see Uploading Private Keys and Access to Keys.
Note: When testing in various environments, you must re-upload your key to the new
environment. For example, if you upload a key in your production account and refresh your
sandbox account, you must still re-upload your key in the sandbox account.
You can view the list of uploaded keys on the Keys page.
Access to Keys
If you are not using the Administrator role, you need a custom role with the Key Management permission
in order to view the Keys page and upload new keys.
Authentication Guide
Uploading Private Keys 212
■ Key Management — This permission controls access to the Keys page in the UI.
■ Key Access —This permission controls access through scripting. When you select a custom role with
this permission in the Execute As Role field on script deployments, the script can access the keys.
Authentication Guide
RESTlet Authentication 213
RESTlet Authentication
RESTlets require authentication and calls are processed synchronously. The way to provide login
credentials for a RESTlet varies according to whether the RESTlet is called from an external client or from
a client hosted by NetSuite, such as a client SuiteScript.
See the following sections for information about authentication for RESTlets:
Note: RESTlets are part of SuiteScript. They are not part of NetSuite’s web services feature. Be
aware that if a role has the Web Services Only option set to true, a user logged in through that role
is permitted to send web services calls only. RESTlet calls receive an INVALID_LOGIN_CREDENTIALS
error response.
■ For a RESTlet called from an external client, you can use OAuth or the NetSuite-specific method
NLAuth in the HTTP Authorization header. OAuth uses token-based authentication (TBA) or OAuth
2.0 to access resources on behalf of a user, eliminating the need to share login credentials such as
username and password. It is recommended that you use TBA or OAuth 2.0 for RESTlet authentication.
For more information, see the following topics:
□ The Three-Step TBA Authorization Flow for TBA.
□ OAuth 2.0 Authorization Code Grant Flow for OAuth 2.0.
NLAuth passes in NetSuite login credentials such as company ID, user name, password, role, and
application ID. See Using User Credentials for RESTlet Authentication.
■ For a RESTlet called from a client hosted by the same NetSuite account that hosts the RESTlet, you do
not need to pass authentication information in the HTTP request. A check for all valid NetSuite session
cookies occurs, and this existing session is reused.
Important: RESTlet authentication can use either the HTTP Authorization header or all session
cookies, but not both. Please ensure that your script uses only one form of authentication.
Authentication Guide
Setting up Token-based Authentication for a RESTlet integration 214
Important: All encoding in TBA is percent encoding. Strings must be escaped using RFC 3986.
If you do not escape characters in the header, you may receive an INVALID_LOGIN_ATTEMPT
error. For more information about percent encoding, go to https://tools.ietf.org/html/
rfc5849#section-3.6.
Note: Web Services Only roles are only for access to NetSuite through web services. Roles with
the Web Services Only restriction will not work with RESTlets.
Note: If you are calling a RESTlet from an external source, you must authenticate by using
TBA, OAuth 2.0 or user credentials. For details on user credentials, see Using User Credentials
for RESTlet Authentication. For details on OAuth 2.0, see Setting up OAuth 2.0 for a RESTlet
Integration.
■ You must have enabled the Token-based Authentication feature. For details, see Enable the Token-
based Authentication Feature.
■ You must have created a role that permits logging in using token-based authentication. For details,
see Set Up Token-based Authentication Roles.
■ You must have assigned a user to a role that has permission to log in by using token-based
authentication. For details, see Assign Users to Token-based Authentication Roles.
Authentication Guide
Setting up Token-based Authentication for a RESTlet integration 215
■ An integration record representing the sending application must exist at Setup > Integration >
Manage Integrations. On the integration record, the Token-based Authentication option must be
enabled. Enabling this option causes the system to generate the consumer key and secret that
represent the application. For details, see Create Integration Records for Applications to Use TBA.
■ You must have the consumer key and secret that were generated when the integration record’s
Token-based Authentication option was enabled. If you do not have these credentials, you can
generate new ones. For details, see the help topic Regenerating a Consumer Key and Secret.
■ You must have created a token and token secret for the user who will call the RESTlet. For details on
this process, see Manage TBA Tokens in the NetSuite UI.
Note: For general details about NetSuite’s Token-based Authentication feature, see Token-based
Authentication (TBA).
After you have verified that the prerequisite steps have been completed, you can create logic for
generating an OAuth header. For details on the data required for creating the header, see Step 1: Obtain
An Unauthorized Request Token.
Important: All encoding in TBA is percent encoding. Strings must be escaped using RFC 3986.
If you do not escape characters in the header, you may receive an INVALID_LOGIN_ATTEMPT
error. For more information about percent encoding, go to https://tools.ietf.org/html/
rfc5849#section-3.6.
Authorization:
OAuth realm="12345",
oauth_consumer_key="4a3ff6c251a55057bb1e62d8dc8998a0366e88f3a8fe735265fc425368b0f154",
oauth_token="52cfe88fecf2e2b74e833e7dfc4cae79ff44c3ca9f696d61e2a7eac6c8357c3c",
oauth_nonce="qUwlmPvtGCS4sHJe8F7x",
oauth_timestamp="1462453273",
oauth_signature_method="HMAC-SHA1", oauth_version="1.0",
oauth_signature="8PI9lIYxUmUONjxEFJUSMD9oOmc%3D"
For more information, log in to SuiteAnswers and review the following articles.
Important: For help logging in to SuiteAnswers, see the help topic SuiteAnswers Overview. You
must log in to SuiteAnswers before you can access the following links.
Authentication Guide
Setting up OAuth 2.0 for a RESTlet Integration 216
application accesses the protected resources on behalf of a user who gave an explicit permission for
the access. This method eliminates the need for RESTlets or REST web services integrations to store
user credentials. OAuth 2.0 can be used as an alternative to Token-based Authentication. It is more
straightforward to implement, because request signing is not required.
Note: Web Services Only roles are only for access to NetSuite through web services. Roles with
the Web Services Only restriction will not work with RESTlets.
OAuth 2.0 allows integrations to comply with any authentication method that is deployed in a NetSuite
account for UI login, such as SAML Single Sign-on, OpenID Connect (OIDC) Single Sign-on, or Two-Factor
Authentication. To enable OAuth 2.0 feature, see Enable the OAuth 2.0 Feature.
OAuth 2.0 introduces two new permissions. For more information, see Add OAuth 2.0 Permissions to
Roles.
Administrators and users with the OAuth 2.0 Authorized Applications Management permission can
manage all authorized applications in the account. For more information, see Managing OAuth 2.0
Authorized Applications.
■ Enable the OAuth 2.0 feature in your account. For more information, see Enable the OAuth 2.0
Feature.
■ Set Up roles for use with OAuth 2.0 and assign users to the roles. For more information, see Add
OAuth 2.0 Permissions to Roles.
■ Create an integration record for use with OAuth 2.0. For more information, see Create Integration
Records for Applications to Use OAuth 2.0.
After you set up an integration record for use with OAuth 2.0, you must create an external application that
initiates the OAuth 2.0 flow. For more information, see OAuth 2.0 Authorization Code Grant Flow.
https://<accountID>.app.netsuite.com/app/site/hosting/restlet.nl?script=1&deploy=1
Authentication Guide
Setting up OAuth 2.0 for a RESTlet Integration 217
The following is an example of the OAuth 2.0 authorization header for RESTlets:
Warning: As of the 2021.1 release, user credentials authentication for newly created RESTlets
will not be supported. If you attempt to authenticate a new RESTlet, with user credentials
after your account is upgraded to 2021.1, an HTTP error response will be returned. For more
information, see the help topic Advance Notice: Upcoming Deprecation of RESTlet Authentication
Through User Credentials.
Either the three-step TBA authorization flow or the OAuth 2.0 authorization code grant flow should
be used for all new integrations. Developers of existing integrations currently using the issuetoken
endpoint should consider migrating the integration to the TBA authorization flow. For information,
see the following:
If you are calling a RESTlet from an external source, you must authenticate by using token-based
authentication or OAuth 2.0. For details on TBA, see Using TBA for RESTlet Authentication (OAuth).
For details on OAuth 2.0, see Using OAuth 2.0 for RESTlet Authentication.
Required Data
To construct an NLAuth authorization header, you use the fields described in the following table.
Important: Strings must be escaped using RFC 3986. If you do not escape characters in the
header, you may receive an INVALID_LOGIN_ATTEMPT error. For more information about percent
encoding, see https://tools.ietf.org/html/rfc5849#section-3.6.
Authentication Guide
Using User Credentials for RESTlet Authentication 218
nlauth_role The internal ID of a role No If you omit this value, the system selects a
with which the user is role based on the logic described in RESTlet
associated. and SOAP Web Services Role Selection Logic.
nlauth_otp The value of the one- No For the issue token endpoint, including
time password (OTP) the nlauth_otp parameter in the NLAuth
Important: This is the same as the authorization header permits the sending of
value of a two–factor an OTP. The OTP is a 2FA verification code.
parameter can
authentication (2FA)
only be used with For more information, see the following
verification code
the issue token topics:
generated by an
endpoint.
authenticator app when
■ Mandatory 2FA, the IssueToken
a user is logging in to the
Endpoint, and nlauth_otp
NetSuite UI.
■ Issue Token and Revoke Token REST
Services for Token-based Authentication
If a Customer Center role must be used in an integration, you should explicitly specify the role. If no role is
specified, the system chooses a role. The system tries to use a non-Customer Center role. If there are no
available non-Customer Center roles, login is attempted with a Customer Center role. The overall order of
role selection is:
Authentication Guide
Using User Credentials for RESTlet Authentication 219
For more information about specifying a role in a RESTlet or SOAP web services request, see:
Important: RESTlet authentication accepts special characters only if they are URL encoded.
If your credentials contain special characters, replace each special character with its appropriate
URL encoding. For additional information on URL encoding, see http://www.w3schools.com/tags/
ref_urlencode.asp.
Syntax
The NLAuth header requires the following elements:
Examples
The following snippet shows a correctly formatted NLAuth header.
The following snippet shows a correctly formatted NLAuth header when using the token endpoint. The
header includes a verification code (an OTP for passing a 2FA challenge) using the nlauth_otp parameter.
For an example of a shell script that generates an NLAuth header, see the help topic Example: Shell Script
that Calls a RESTlet.
Authentication Guide
Tracking RESTlet Calls Made with TBA and OAuth 2.0 220
Integration records are located at Setup > Integration > Manage Integrations. For more information on
using integration records in conjunction with RESTlets, see the following topics:
Note: For more information about managing integration records, see the help topic Integration
Management, which is part of the SOAP Web Services Platform Guide. However, be aware that
some of the detail in that guide pertain only or primarily to SOAP web services.
Blocking an Application
If appropriate, you can block an application represented by an integration record. Blocking an application
has the following effects:
■ The application is blocked from authenticating using the consumer key associated with the integration
record. So, if an application is using an OAuth header to call RESTlets (using data from this integration
record), these calls will be blocked,
■ If the application makes SOAP web services requests, the requests are blocked if they reference either
the consumer key or the application ID associated with the integration record.
Note that this procedure does not prevent an application from calling a RESTlet by using the NLAuth
authentication method. Similarly, the application is not blocked if it already has an existing session.
To block an application:
1. Navigate to Setup > Integration > Managing Integrations, and open the appropriate integration
record for editing.
2. Set the State field to Blocked.
3. Click Save.
Note: Calls made using the NLAuth method of authentication are not logged on any integration
record.
For each logged request, the RESTlets Execution Log includes details such as the following:
Authentication Guide
Tracking RESTlet Calls Made with TBA and OAuth 2.0 221
Authentication Guide
Issue Token and Revoke Token REST Services for Token-based Authentication 222
Important: You can use TBA with those integrations that require the Administrator role.
Administrators can only create tokens for their own use by clicking the Manage Access Tokens link
in the Settings portlet, or by using the token endpoint.
In addition to creating a token manually through the NetSuite UI, developers and users can issue or
revoke their own tokens programmatically using a token endpoint. You can also use a token endpoint to
obtain information about a token.
Users cannot programmatically issue or revoke tokens for other users using a token endpoint. For
information about creating tokens for other users through the NetSuite UI, see Viewing, Editing, Creating,
and Revoking TBA Tokens.
Account-specific domains are supported for RESTlets. For example, if your account ID is 123456, your
account-specific REST domain would be 123456.restlets.api.netsuite.com. For more information, see
the help topic URLs for Account-Specific Domains. See also the Integration Domains section in the topic
How to Transition from Data Center-Specific Domains.
Important: Whether using The Three-Step TBA Authorization Flow, or calling The IssueToken
Endpoint, an Integration record is created and automatically installed in your account. The
Require Approval during Auto-Installation of Integration preference affects whether this
new record is automatically enabled. You can manage the preference at Setup > Integration >
SOAP Web Services Preferences. If the box for the Require Approval during Auto-Installation
of Integration preference is not checked (set to false) the State field on the new application is
automatically set to Enabled, and all requests are permitted. However, if the box is checked (set
to true) the State field on the new integration record is set to Waiting for Approval. In the latter
case, you must manually edit the record and set the State to Enabled. Until you set the state to
Enabled, all requests sent by that application are blocked.
Authentication Guide
Calling a token endpoint to revoke a token 223
■ A token endpoint consumes two GET parameters. For an issuetoken request, the Consumer Key
parameter is mandatory, and the Name (the name of the token) is optional.
For example:
https://<accountID>.restlets.api.netsuite.com/rest/issuetoken?consumerKey=<CONSUMER_KEY>&name=<TOKEN_NAME>
■ The issue token endpoint has been extended to accommodate the requirement for mandatory 2FA
for highly privileged roles. There is an optional parameter, nlauth_otp, that you can include in the
NLAuth Authorization header. For more information, see Mandatory 2FA, the IssueToken Endpoint,
and nlauth_otp.
■ Company Name
■ Company ID (account ID)
■ Role Name
■ Role ID
■ Entity ID
Authentication Guide