SAP Knowledge Base Article - Public

3141692 - How to capture API Audit Logs from SAP SuccessFactors

Symptom

This document explains the optimal way to capture API Audit Logs from SAP SuccessFactors when analyzing integration or API behavior issues, or when requested by Cloud Support. 

The KBA is applicable to all API calls to SuccessFactors, regardless of the other system being integrated.

Following this ensures a complete view of the API issue, from both the front-end and back-end, and helps support and engineering teams resolve cases more efficiently. 

"Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental." 

Environment

  • SAP SuccessFactors HCM Suite
  • Compound Employee API
  • OData API

Resolution

Steps overview:

  1. Enable the All Payloads button under Audit Log Settings;
  2. Reproduce the issue;
  3. Apply filters under OData/SFAPI API Audit Logs;
  4. Collect the relevant payloads;

Step 1 - Enable the All Payloads button under Audit Log Settings

  1. Search for Audit Log Settings feature;

  2. Click the relevant tab (OData API or SFAPI) according the API protocol you are using;
    ATTENTION: Choose SFAPI for CompoundEmployee or SOAP API protocols. Standard SF to ERP replication mostly use CompoundEmployee/SFAPI.

  3. Click on Enable All Payloads. This setting is temporary and will automatically disable after 4 hours;

   

Step 2 - Reproduce the issue

  1. Wait 1 minute and reproduce the issue, by running the integration or making the problematic API request;
    NOTE: Reproducing the issue for just one affected record/employee generates fewer logs and makes it much easier to find.


       

Step 3 - Apply filters under OData/SFAPI API Audit Logs

  1. Go to OData API Audit Logs OR SFAPI Audit Logs;

  2. Search for the request in which you reproduced the issue by applying some filters such as Request Time, Entity Name, API Operation, API User (Login ID) and so on;

    See the example below:

          

Step 4 - Collect the relevant payloads

  1. Click in the '...' button in the last column from the relevant line;

  2. Open all available tabs and download all files associated with the request;

  3. Consolidated the files in one .zip folder and attach it on the case;


      

TIPS

  • How to know which system did the API call? "ip address" & "User-agent" fields in the Request Header tab indicate it

  • SAP CPI middleware scenarios (with SF Adapter): "Correlation-Id" in the Request Header matches the Message ID of the relevant execution, while "Process-Name" indicates the process name.
      
  • Boomi middleware scenarios (with SF Adapter): "x-sf-execution-id" in the Request Header matches the Execution ID of the relevant execution.
  • More TIPS can be found in How to check and understand OData API Audit Logs - SuccessFactors OData API.

See Also

2748769 - Best practices for opening and updating SAP SuccessFactors Support Cases

Keywords

API, OData, SFAPI, audit log, audit logs, log files, Correlation-Id, Process-Name, Boomi, SF Adapter, x-sf-execution-id , KBA , LOD-SF-INT-API , API & Adhoc API Framework , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT-CPI , Standard SF to 3rd Party CPI (HCI) Content , LOD-SF-INT-MDF , Metadata Framework API (MDF) , LOD-SF-INT-EC , Employee Central SFAPI & OData Entities , LOD-SF-INT-CE , Compound Employee API , How To

Product

SAP SuccessFactors HCM Suite all versions

Attachments

Pasted image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
Pasted image.png
image.png
image.png
image.png
image.png
image.png