Symptom
A custom report is created from the SuccessFactors UI > Analytics > Reporting > Adhoc
This report is not available in the list of entities in the SFAPI Data Dictionary for the API user.
Environment
SAP SuccessFactors API - adhoc SFAPI
Reproducing the Issue
The request API call to trigger one SFAPI Adhoc will be like this sample below:
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<submitQueryJob xmlns="urn:sfobject.sfapi.successfactors.com">
<queryString>SELECT LT_FORM_SUBJECT_MANAGER_USERS_SYS_LASTNAME FROM AdhocReport_5566</queryString>
</submitQueryJob>
</Body>
</Envelope>
Cause
- Any Adhoc Report created would be visible only to the Owner of that particular Adhoc Report.
- Any other user will not have access to this report.
- This is by design, since reports might have confidential information.
- Alternatively, this may mean that the report was not created correctly or the creator failed to create the report.
Resolution
Since the Adhoc report is visible only to the owner of the report, it might not be available for the SFAPI user to query the ADHOC report nor will it be visible in the SFAPI Data Dictionary.
For cause no. 4 above, the creator of the report must check the error when creating it and ensure the report is correctly created.
How to grant permission to the API user for the Adhoc Report
1. Login to your instance via the user who has created the Adhoc Report.
2. Navigate to Analytics > Reporting > Ad Hoc Reports
3. Click on the "Share" button.
4. Click on Advanced Search
5. Search for the API User here, in the "User Name" field.
6. Select the API user from the the Search Results and click on the "Share" button.
What would this do?
1. This report would now be visible for the SFAPI user (or any user with whom the report is shared) from the SuccessFactors UI > Analytics > Reporting > Ad Hoc Report
2. This report would be available as an entity for the SFAPI user (or any user with whom the report is shared) to query it using API.
------
Just adding more context and tips...
If you try to run a query for one report that was assigned to one user before and later unshared, you will observe errors in the SFAPI response like this:
- <faultcode>ns2:Server</faultcode> <faultstring>SFAPI Domain Error!</faultstring> <detail> <ns2:SFWebServiceFault xmlns:ns2="urn:fault.sfapi.successfactors.com" xmlns="urn:sfobject.sfapi.successfactors.com"> <ns2:errorCode>NO_PERMISSIONS_EXCEPTION</ns2:errorCode> <ns2:errorMessage>Insufficient permissions!</ns2:errorMessage> </ns2:SFWebServiceFault>
The error message above indicates the API user who tried to run the report don't have permissions (in fact don't have access to this report anymore).
- If you don't know the report name anymore, but you know the ID, example "AdhocReport_5566"
- please share this information with SAP support and we can help to find using our server logs (internal search will be SF Company ID + reportId=5566)
- If you don't know the report ID anymore, but you know the name, example "My Peformance Report"
- please share this information with SAP support and we can help to find using our server logs (internal search will be SF Company ID + Report name)
Keywords
SuccessFactors Analytics, Ad Hoc, ADHOC, Ad Hoc Report, SFAPI, API, SFAPI Data Dictionary, Boomi , KBA , LOD-SF-INT-API , API & Adhoc API Framework , Problem