Genesys Cloud - Main

 View Only

Sign Up

  • 1.  Get List of Assigned Roles for all Users

    Posted 4 days ago

    Hi All,

    I am looking for a way to export a list of all users in our Org and the roles assigned to them. This is required by our risk team for quarterly access audits. I have tried adding the Role column in the Agent Performance view and exporting the view but the Role column does not get exported. Any suggestions?

    Thanks,


    #Reporting/Analytics

    ------------------------------
    Scott Stewart
    ------------------------------


  • 2.  RE: Get List of Assigned Roles for all Users

    Posted 4 days ago

    I tried it here too, and in fact, I didn't export the role column.

    Specifically via the interface, I don't know of any other place.

    You can obtain this data via API.

    I found this idea on the portal: https://genesyscloud.ideas.aha.io/ideas/OP-I-467

    Based on the ADMIN's comment on the idea, the feature will be available in H2-2026.



    ------------------------------
    Kaio Oliveira
    GCP - GCQM - GCS - GCA - GCD - GCO - GPE & GPR - GCWM

    PS.: I apologize if there are any mistakes in my English; my primary language is Portuguese-Br.
    ------------------------------



  • 3.  RE: Get List of Assigned Roles for all Users

    Posted 3 days ago

    Thanks Kaio, for the response and the link to the idea portal. I have searched in the API Explorer for an API that would provide the info but I have not been able to find one. I found APIs that would show all users assigned to a specific role but not all users and the roles assigned to them. Unless I am missing something, this seems to be a big gap in Genesys reporting. Thanks again for your help.



    ------------------------------
    Scott Stewart
    ------------------------------



  • 4.  RE: Get List of Assigned Roles for all Users

    Posted 3 days ago

    See if this helps: by accessing the API GET  "/api/v2/users/{subjectId}/roles" you can pass the user ID as a parameter and it will return the roles and permissions.

    {

     "roles": [ {

     "id": "1dd72dc4-9c4e-41f7-ad66-XXXXXXXXXXX",

     "name": "employee"

      },

      {

    "id": "3889e921-51f2-49a3-898f-XXXXXXXXX",

     "name": "Field_Service"

     }

      ],

      "permissions": [

     "agentUI:agents:view",

     "agentUI:conversationSummary:view",

      "agentUI:defaultPanels:view",

     "alerting:alert:view",

    .

    .

    .

    .

    .

    .



    ------------------------------
    Kaio Oliveira
    GCP - GCQM - GCS - GCA - GCD - GCO - GPE & GPR - GCWM

    PS.: I apologize if there are any mistakes in my English; my primary language is Portuguese-Br.
    ------------------------------



  • 5.  RE: Get List of Assigned Roles for all Users

    Posted 3 days ago

    Thanks again for the info, is there a practical way to do this for 400 users?



    ------------------------------
    Scott Stewart
    ------------------------------



  • 6.  RE: Get List of Assigned Roles for all Users
    Best Answer

    Posted 3 days ago

    Hi Scott, 

    One way you can pull all users (400) and their assigned roles directly via API is to use the below API:

    GET /api/v2/users?pageSize=500&expand=authorization

    Set pageSize to 500 (the max). If you have around 400 users, this should return everyone in a single call. The expand=authorization parameter ensures that each user's role assignments are included in the response.

    If you have more than 500 users, check the pageCount or nextUri in the response and request additional pages using pageNumber.

    This approach is much more scalable and works well for recurring quarterly audits. You can then export the API response to CSV for your risk team.



    ------------------------------
    Josh Coyle
    Senior Professional Services Consultant
    ------------------------------



  • 7.  RE: Get List of Assigned Roles for all Users

    Posted 3 days ago

    Thanks Josh, this API gives me the info I was looking for.



    ------------------------------
    Scott Stewart
    ------------------------------



  • 8.  RE: Get List of Assigned Roles for all Users

    Posted 3 days ago
    Perfect...
     
    I was looking for something like "/api/v2/users?expand=roles"... I didn't think to look with "authorization".
     
    I learned something new, thank you as well.


    ------------------------------
    Kaio Oliveira
    GCP - GCQM - GCS - GCA - GCD - GCO - GPE & GPR - GCWM

    PS.: I apologize if there are any mistakes in my English; my primary language is Portuguese-Br.
    ------------------------------