SAP Knowledge Base Article - Public

3791612 - How to use TodoEntryV2 API to return only the logged-in user data in a GET query- SuccessFactors OData API

Symptom

When querying data from TodoEntryV2, records of other users are being returned. However, you expect only the logged-in user's data to be returned.

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
    • OData API

Reproducing the Issue

  1. Authenticate to the OData API using user "john", for example.
  2. Execute a GET request to the TodoEntryV2 entity.
  3. Observe that the response includes to-do records that belong to other users. However, you expected only "john" records to be returned.

Resolution

Add the parameter "&ignoretodoexport=true" to your API query. This parameter will result in the query returning only the logged-in user's To Do entries.

Example query:
https://<API_URL>/odata/v2/TodoEntryV2?&$format=json&ignoretodoexport=true

See Also

TodoEntryV2 | SAP Help Portal

Keywords

todoentryv2, odata, ignoretodoexport, to-do, to do, oauth, logged-in user, self-only, user scope, , KBA , LOD-SF-INT-ODATA , OData API Framework , How To

Product

SAP SuccessFactors HCM Suite all versions