Legacy Dev Forum Posts

 View Only

Sign Up

  • 1.  Role Permissions

    Posted 06-05-2025 18:21

    Chris_Carr | 2022-02-15 15:59:58 UTC | #1

    Hi,

    I am trying to get all of the permissions that are assigned to a role using https://developer.genesys.cloud/api/rest/v2/authorization/#get-api-v2-authorization-roles--roleId-

    I have noticed that some of the results return an empty permission list as per the below as an example, however, there are permissions assigned to the role which I can see on the UI. Any assistance would be appreciated.

    "name": "Developer", "description": "Developer of Public API client applications", "defaultRoleId": "developer", "permissions": [],

    Thank you very much.

    Kind Regards, Chris Carr


    Becky_Powell | 2022-02-15 20:23:08 UTC | #2

    Hi Chris, are you not receiving the permission policies in the API response? I tested that resource and received the permission policies in the API response as expected.

    Thanks, Becky


    Chris_Carr | 2022-02-15 20:37:21 UTC | #3

    Hi Becky,

    Thank you for your response. It is possible that I am looking at the wrong key/object. I am looking at the "permissions" array.

    For example I have just received the permissions for the "admin"

    "name": "admin", "description": "Organization Administrator", "defaultRoleId": "admin", "permissions": [ "contentmanagementuser", "admin", "employee", "contentmanagementadmin" ], "permissionPolicies": [ { "domain": "presence", "entityName": "presenceDefinition", "actionSet": [ "add", "edit", "delete" ], "allowConditions": false }, { "domain": "analytics", "entityName": "dataExport", "actionSet": [ "*" ],

    Then for some roles the permission array is empty such as the below:

    "name": "Developer", "description": "Developer of Public API client applications", "defaultRoleId": "developer", "permissions": [],

    I do receive permission policies so am I supposed to be looking at "permissionPolicies" instead?

    Thank you for your assistance.

    Kind Regards, Chris Carr


    Becky_Powell | 2022-02-18 22:25:06 UTC | #4

    Hi Chris. Most roles contain permissions in the domain:entity:action format, which are returned from the API as permission policies. Only a handful of legacy permissions do not carry that format and will be returned as permissions rather than permission policies. You should look at both in this API's response.

    Thank you!


    Chris_Carr | 2022-02-18 22:25:19 UTC | #5

    Thank you very much!


    system | 2022-03-21 22:26:17 UTC | #6

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 13584