---
sourceDocument: Australia Asset Management
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/it-asset-management

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia Asset Management

ft:clusterId :

    - itam

bundleId :

    - itam

workflow :

    - Technology


---

# Establish an SAP connection using OAuth 2.0

# Establish an SAP connection using OAuth 2.0 {#ariaid-title1}

* Release version: Australia
* 
* Updated March 12, 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 3 minutes to read

Create a connection profile to establish a connection between your SAP system and your ServiceNow instance using OAuth 2.0 authentication.

## Before you begin

Before establishing a connection between SAP and your ServiceNow instance, make sure that the following conditions are met:

* Verify if your SAP system network is accessible to external applications like ServiceNow.
* If external connections are blocked, install a MID Server. A MID Server enables communication and data movement between a ServiceNow instance and external applications or data sources. For instructions, see [Installing the MID Server](https://www.servicenow.com/docs/access?context=mid-server-installation&version=australia&pubname=australia-servicenow-platform&ft:locale=en-US).
{#add-sap-connection-oauth__ul_enb_fvq_k3c}

If you already have a MID Server installed in the network and connected to your ServiceNow instance, this SAP connection automatically uses it.

Role required: sam_admin

## Procedure

1. Navigate to AllSAP Compliance and OptimizationConnection Setup and select New.
2. On the form, fill in the fields.  
   {#add-sap-connection-oauth__table_llt_dlc_hfb__entry__2}

   | Field | Description |
   |-|-|
   | Name | Name of connection profile. |
   | Default price list | Default price list that should be considered for reconciliation. |
   | Connection type | Values include: * Basic Auth * OAuth 2.0 {#add-sap-connection-oauth__ul_nnt_sgq_13c} |
   | Connection URL | The base URL to connect to the SAP instance. |
   | OAuth Client ID | Client ID for your SAP connection. |
   | OAuth Client Secret | Client secret for your SAP connection. |
   [Table 1. SAP Connection Setup form]

   {#add-sap-connection-oauth__table_llt_dlc_hfb}  
   Note:  
   You can get the OAuth Client ID and Client Secret at the time of registering your SAP application.
3. Select Submit.  
   The initial connection is established.
4. Select the SAP connection and review the fields on the record.  
   {#add-sap-connection-oauth__table_vzk_fwb_qfb__entry__2}

   | Field | Description |
   |-|-|
   | Name | Name of the connection profile. The value is generated in the SAP Connection Setup form. |
   | Default price list | Default price list that should be considered for reconciliation. The value is generated in the SAP Connection Setup form. |
   | Use USMM Role Optimization | The option to specify USMM role-based optimization that must be applied during reconciliation. |
   | Last run | Date and time when the data was last pulled for the SAP connection. |
   | REST message | REST message that contains the SAP API information. |
   | OAuth entity profile | The OAuth entity profile that contains the credentials for the connection. |
   | Active | Option that indicates that the SAP connection is active. |
   | Connection type | This field is automatically populated based on your connection type. |
   | User Mapping ||
   | SAP user field | SAP users across different clients that are mapped to a corresponding ServiceNow user. |
   | User field | ServiceNow user field. Important: Changing the values in the User Mapping fields after data is pulled results in the loss of the mapping between discovered users and system users. The mapping between discovered users and the Rights used by and Rights needed by fields is also lost. |
   | Configuration ||
   | Fetch roles | Controls the data pull from SAP for roles data. |
   | Fetch engine usage | Controls the data pull from SAP for engine usage data. |
   | Fetch digital access usage | Controls the data pull from SAP for digital access usage data. |
   | Fetch activity | Controls the data pull from SAP for user activity and web activity data. |
   | Fetch user transactions | Controls the data pull from SAP for user transaction activity data. |
   [Table 2. SAP Connection form]

   {#add-sap-connection-oauth__table_vzk_fwb_qfb}
5. Generate an access token by selecting the Get OAuth Token related link.  
   Note:  
   You must be in the local network of SAP to generate the access token.
   1. Log in using your SAP credentials.
   2. In the Access Permission Request dialog box, select Allow for the scopes that you had added during the application registry.  
      A message is displayed on the SAP Connection form indicating that the OAuth refresh token is available.
   {#add-sap-connection-oauth__substeps_z12_vbr_13c}
6. If you're running the latest version of the ABAP program, test your SAP connection by selecting the Test SAP Connection and Version related link.  
   Note:  
   If you upgrade your ServiceNow instance, you must download and deploy the compatible version of the ABAP program and reconfigure a service provider with the SOA Manager.
7. Send a request to the custom ABAP program to collect the SAP data into the custom tables again by selecting the Refresh data in SAP related link.
8. If the SAP data you pulled is corrupted, view current data by selecting the Pull all SAP Data to ServiceNow related link.  
   SAP data is scheduled to be pulled regularly.
9. **Optional:** Update connection information by selecting the Update connection related link.
10. Select Submit.
11. View SAP clients in the SAP Clients related list.  
    The SAP clients are generated when SAP data is pulled during the scheduled job.
12. Select Update.

## Result

The SAP connection is established.

## What to do next

You can start creating software models and entitlements.
**Related concepts**   

* [Set up SAP integration to establish a connection with SAP](https://servicenow-prod.fluidtopics.net/w~lL1I65l3y5GcQt4BtQdA "Configure and set up SAP integration to establish a connection between your Software Asset Management application and SAP.")
* [SAP USMM-based optimization](https://servicenow-prod.fluidtopics.net/9~fub5ytqsuf_Zfc02l4og "Optimize licensing through SAP User License Measurement (USMM) rules that map roles to the Named User Type for an SAP client.")
* [User transaction activity for named user types](https://servicenow-prod.fluidtopics.net/ssixDObgCtQwe8uNkVicRw "Determine license optimizations for your SAP named user types based on your SAP user transaction activity.")
* [Self-declaring SAP engine license usage](https://servicenow-prod.fluidtopics.net/PCCButaknmmWgwyID2PQGA "You can self-declare the license usage for any SAP engines that cannot be measured by the automated SAP engine measurement process. Use this information to gain more comprehensive visibility into your SAP license compliance position so that you can optimize your licensing costs.")  
**Related tasks**   

* [Establish an SAP connection using basic authentication](https://servicenow-prod.fluidtopics.net/OnoDC4RxnIcvmmBQYOnhjQ "After you have deployed the Advanced Business Application Programming (ABAP) program in your SAP system, create a connection profile to establish a connection between your SAP system and your ServiceNow instance using basic authentication.")
* [Create entitlements for SAP](https://servicenow-prod.fluidtopics.net/kZdSHeCB8tKCcxpZxL19NA "Create software entitlements to record your license information for SAP products. You can create entitlements individually or import them from a spreadsheet.")
* [Create software models for SAP](https://servicenow-prod.fluidtopics.net/Hv0iokdE7Ht1LFN9aPZopw "Create software models to record SAP product information.")
* [Create a custom SAP named user type](https://servicenow-prod.fluidtopics.net/zqtnqqyyT1Qy35gI64XEtw "Create a custom SAP named user type so that you can track and manage your SAP licenses based on the named user type that is specific to your SAP system.")
* [Map a role to a named user type](https://servicenow-prod.fluidtopics.net/aEoNqdz2wH6OhaG3752REQ "You can optimize your SAP licenses by mapping roles to a named user type. During reconciliation, discovered user roles and their assigned named user types are compared against these roles to identify user that can be given a lower named user type.")
* [Create custom SAP price lists](https://servicenow-prod.fluidtopics.net/59wwexjRYdPUfoyKCSEtJQ "Create custom SAP price lists so that you can track and manage SAP licenses based on the contracts that are specific to your SAP system.")
* [Import custom SAP named user types](https://servicenow-prod.fluidtopics.net/ercTjKT6ypNmLFm2jr_8qQ "Import custom SAP named user types into your ServiceNow instance so that you can track and manage SAP licenses based on the named user types that are specific to your SAP system.")
* [Import custom SAP price lists](https://servicenow-prod.fluidtopics.net/Olp1_AFIjXVmm28VJ5WgyA "Import custom SAP price lists into your ServiceNow instance so that you can track and manage SAP licenses based on the contracts that are specific to your SAP system.")  
**Related reference**   

* [Tables installed with the SAP publisher pack](https://servicenow-prod.fluidtopics.net/lrmWBbQftzarA9h0B~Isbw "Tables are installed with the Software Asset Management Professional for SAP plugin. The tables store data pulled from the SAP systems.")
* [Software Publisher Analytics dashboard for SAP in Software Asset Management classic](https://servicenow-prod.fluidtopics.net/auOLZNtYvlNBU1pGSxZPow "View your license compliance position for SAP on the Software Publisher Analytics dashboard in the Software Asset Management classic application.")
* [Publisher overview for SAP in the Software Asset Workspace](https://servicenow-prod.fluidtopics.net/r7BkebvxkRFZuY5OncsfAg "View license usage information related to SAP in the publisher overview for SAP in the Software Asset Workspace.")

*[\>]: and then


