Symptom
You need to get the name/label of a permission through OData API. For example, you have the following permission in SuccessFactors:
And you need to return its label (Employee Central HRIS OData API (editable)) using OData API.
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
- OData API
Resolution
Through the RBP entities of OData like RBPBasicPermission and RBPRole expanding to permissions this isn't possible because the response from the API returns only the ID of the permission and its technical name (permissionStringValue), as below:
"permissionId": "761",
"permissionLongValue": "-1",
"permissionType": "admin_manage_ect_api",
"permissionStringValue": "import_ect_hris_odata_api_edit_admin_permission"
One way to get the label is to use the functions below:
- getUsersPermissions
- getRolesPermissions
They are described in this page of the guide.
When you use them, they return an XML response with all the permissions of the Users/Roles you specify in the filter of the query. The XML response shows the technical name and its corresponding technical label, as below:
<permission-item perm-type="admin_manage_ect_api" permission-long-value="-1" permission-string-value="import_ect_hris_odata_api_edit_admin_permission">
<message key="ADMIN_RBP_ECT_HRIS_ODATA_API_EDIT_TITLE">
<content language="en-US">
<![CDATA[Employee Central HRIS OData API (editable)]]>
</content>
</message>
</permission-item>
See Also
Keywords
tag, label, name, id, successfactors, sf, api, odata, rbp, permission, role based permissions, group, function, getUsersPermissions, getRolesPermissions, permission-string-value, permissionStringValue, id, permissionId, RBPBasicPermission, RBPRole, response, xml, technical name, , KBA , LOD-SF-INT-ODATA , OData API Framework , How To
Product
Attachments
image.png |