Configure OAuth authorization code flow for Zero Copy Connector for ERP

task australia Updated Oct 22, 2026 3 min read configure-oauth-authorization-code-flow-to-use-in-zero-copy-connector-for-erp.md
Raw file servicenow.com

Configure OAuth authorization code flow for SAP and use OAuth to authenticate and authorize users for OData endpoints.

Before you begin

Note: The OAuth authorization code flow can be used to call OData endpoints (create, read, and update). Currently, OAuth can't be used for tables, BAPI, or RFC.

To understand OAuth, see Set up OAuth and OAuth Inbound.

Consult with your SAP administrator:

  • Obtain the client ID and client secret. You need this information for the application registry form.
  • Ask whether the refresh token is a one-time usable token. A scheduled job that retrieves information from SAP runs once per day. If you need to run the scheduled job more often or on demand, discuss the access token and refresh token options. For more information, see Manage OAuth tokens.
  • Ask them to enable the gateway services to expose the OData endpoints to use.
  • Ask them to create a scope in SAP for the exposed OData endpoints and give you the name and OAuth scope. You need this to configure the scope on the application registry form.

If you have already set up OAuth (for example, with REST through platform features), you can use it in Zero Copy Connector for ERP and skip to step 2 in the procedure.

Role required: sn_erp_integration.erp_admin

Procedure

  1. To set up OAuth, register your application by navigating to All > System OAuth > Application Registry.

    1. Select New.

    2. Select Connect to a third party OAuth Provider.

      Use this form to set SAP as the OAuth provider and ServiceNow as the OAuth client. For detailed information about the fields on this form, see Connect to a third-party OAuth provider.

    3. Enter a Name.

    4. Set ServiceNow as the OAuth client by using the information you obtained from your SAP administrator to fill in the Client ID and Client Secret fields.

    5. In Default Grant type, specify how to authenticate SAP.

    6. Unlock the Authorization URL and Token URL fields to enter the URLs.

      [Omitted image "erp-oauth-usage-flow1.png"] Alt text: Application registry form with fields containing information.

    7. Select the OAuth Entity Scopes tab.

    8. Double-click (or use the keyboard shortcut) in the Name and OAuth scope columns to enter the scope information you obtained from your SAP administrator.

      You can add multiple scopes.

      [Omitted image "erp-oauth-usage-flow2.png"] Alt text: OAuth entity scopes tab on the application registry form.

    9. Select Submit.

  2. Create a credential by navigating to All > Connections & Credentials > Credentials.

    1. Select New.

    2. Select OAuth 2.0 credentials.

      For detailed information about the fields on this form, see OAuth 2.0 credentials.

    3. Enter a Name.

    4. In OAuth Entity Profile, select sap oauth profile default_profile.

    5. In Integration type, select Personal.

      In most cases, it is acceptable to use system-based credentials. However, to obtain information from SAP, such as who changed information or details about approval activities, use the personal integration type. For more information, see Using the Personal Authentication dashboard.

      [Omitted image "erp-oauth-usage-flow3.png"] Alt text: Oauth 2.0 credentials form with fields containing information.

    6. Select Submit.

  3. Add a connection to the correct alias, for example, the following steps use the Zero Copy Connector for ERP HTTP alias.

    1. Navigate to All > Connections & Credentials > Connections & Credentials Aliases.

    2. In Name, search for and select Zero Copy Connector for ERP HTTP.

    3. On the Connections tab, select New.

      For detailed information about the fields on this form, see Create an HTTP(s) connection.

    4. Enter a Name.

    5. In Credential, specify the OAuth credential you created in step 2.

    6. Enter the Connection URL.

    7. Select Submit.

Keywords erpcanvaserp canvasintegrationdata hubzerocopyconnectorsapoauthodataconfigurecodeprovider
Search documentation
Search document titles and file paths on the australia branch