Symptom
Customers try to upsert multiple timeslices with the same externalCode via Odata API when the database has no data, 'No permission to insert MDF Object type cust_XXXX' error message is displayed even though the login user can import the same data via the UI tool.
"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 HXM suite
- Integrations
- MDF API
- Integrations
Reproducing the Issue
Precondition:
1. API user has all permission for entity cust_AH_Demo_P.
2. There is no timeslice existing in the SF instance for the externalCode provided in the payload (0102 in the example below).
API URL and example payload:
https://api_server/odata/v2/upsert?$format=json
[{
"__metadata": {
"uri": "https://api_server/odata/v2/cust_AH_Demo_P(externalCode='0102',effectiveStartDate=datetime'2010-09-08T00:00:00')",
"type": "SFOData.cust_AH_Demo_P"
}},
{ "__metadata": {
"uri": "https://api_server/odata/v2/cust_AH_Demo_P(externalCode='0102',effectiveStartDate=datetime'2010-10-08T00:00:00')",
"type": "SFOData.cust_AH_Demo_P"
}},
{ "__metadata": {
"uri": "https://api_server/odata/v2/cust_AH_Demo_P(externalCode='0102',effectiveStartDate=datetime'2010-11-08T00:00:00')",
"type": "SFOData.cust_AH_Demo_P"
}}
]
Response:
{
"key": "cust_AH_Demo_P/effectiveStartDate=2010-09-08T00:00:00.000Z,cust_AH_Demo_P/externalCode=0102",
"status": "ERROR",
"editStatus": null,
"message": "No permission to insert MDF Object type cust_AH_Demo_P",
"index": 0,
"httpCode": 500,
"inlineResults": null
},
Expect results:
Multiple timeslices should be created/inserted successfully without the above error.
Resolution
This error occurs only when an insert and a create operation is done in the backend within the same payload.
This is issue currently being worked on by our Development team. This KBA will be kept up to date.
Workaround: Please grant the "Metadata Framework > Admin access to MDF OData API" permission to the API user.
Keywords
No permission to insert MDF Object type, MDF API, No permission, insert MDF Object, upsert, MDF-83551, KI2405 , KBA , LOD-SF-INT-MDF , Metadata Framework API (MDF) , LOD-SF-MDF-API , OData APIs & Integrations , Bug Filed