Symptom
- How to fetch the Roles assigned to a User using OData API?
- Is there a limit on how many users you can query?
Environment
- SAP SuccessFactors HCM Suite
- OData API
Resolution
To retrieve the roles assigned to a specific User ID, the getUserRolesByUserId function import can be used:
- Example: /odata/v2/getUserRolesByUserId?userId='sfadmin'
NOTE:
- There is no limit on the amount of users you can query.
- odata/v2/getUserRolesByUserId does not support the 'Inactive' user status.
- If you are not an RBP administrator, you can only access your own permission role list.
- If you are an RBP administrator with “Role-Based Permission Admin (View)” or “Role-Based Permission Admin (Edit)” access, you can view the permission role list of any user you specified.
For further information on all available RBP related function imports, please refer to:
- SAP SuccessFactors HXM Suite OData API: Reference Guide > Common Entities > Role-Based Permissions (RBP) > Function Import
https://help.sap.com/docs/SAP_SUCCESSFACTORS_PLATFORM/28bc3c8e3f214ab487ec51b1b8709adc/8c49f16571524bc7bfafdf8274392b9f.html
Keywords
OData API, User roles, permissions, get user role, RBPRole, getUserRolesByUserId, function import, RBP, role. , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT , Integrations , LOD-SF-INT-API , API & Adhoc API Framework , How To
Product
SAP SuccessFactors HCM Suite all versions
SAP Knowledge Base Article - Public