SAP Knowledge Base Article - Public

2775727 - How to fetch the Roles assigned to a User using OData API in SuccessFactors?

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:  

  1. There is no limit on the amount of users you can query.
  2. odata/v2/getUserRolesByUserId does not support the 'Inactive' user status.
  3. If you are not an RBP administrator, you can only access your own permission role list.
  4. 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:

 

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