Symptom
The field "fileContent" is not present in the payload results when you query Attachment entity of Recruiting module.
NOTE: This scenario is applicable for recruiting attachments only.
Environment
- SAP SuccessFactors HXM Suite
- OData API
Reproducing the Issue
- Perform the query below
https://<apiurl>/odata/v2/Attachment?$top=1&$filter=module eq 'RECRUITING' - Field "fileContent" is not present in the results
OR
-
Perform the query below
https://<apiurl>/odata/v2/Attachment?$top=1&$filter=module eq 'RECRUITING'&$select=fileContent -
Error message below returns
[COE0020]Direct access to Attachment fileContent of module in blocklist is forbidden due to GDPR(General Data Protection Regulation).
Cause
This is an expected behavior when RAL is enabled. Refer to the note below taken from the "Recruiting" section of page Important Notes About Read Audit | SAP Help Portal:
"When read audit is enabled, the fileContent property is hidden from query responses for all Recruiting attachments (module property value is RECRUITING)."
Resolution
The "fileContent" field won't be returned when RAL is enabled.
To get the fileContent field in your API response, you'll need to check whether it's acceptable to turn off RAL for your use case. More details about in pages Read Audit | SAP Help Portal.
If disabling RAL is appropriate for your scenario, follow these steps:
- Go to Manage Audit Configuration screen
- Select Read Audit tab
- Switch off the "Read Access Logging" option
Once RAL is disabled, the fileContent field will be returned in the API response.
See Also
Keywords
successfactors, api, odata, rcm, COE0020, query, not visible, base64, ral, read audit logging , KBA , LOD-SF-RCM-API , Webservices & APIs , Problem
SAP Knowledge Base Article - Public