Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  Copy - Paste Roles and Permissions from one Org to another

    Posted 09-01-2021 07:19
    No replies, thread closed.
    Hi all

    Is it possible to replicate roles for a group, from one org to another? We've got a company group with about 10members. Linked our org with the customer's org, under that group. The customer has added all Roles and Permissions as per our need manually. They have a test org and we'd like to replicate the same for their test org, without customer needing to go through the manual process again. 
    I've pulled the group Roles through an API:
    GET/api/v2/authorization/subjects/"group ID" <<  this gave me 700 lines of data, not the simplest task to navigate through. 

    This API call was sent to me too:
    /api/v2/authorization/roles << should give the whole list of Roles for the prod org. 

    Anyone has tried something like this? How to implement the Roles I've pulled from the Prod Org into the Test Org?

    Any help is much appreciated. 

    Thanks,
    Stan

    #Ask Me Anything (AMA)
    #PlatformAdministration

    ------------------------------
    Stan Vasil
    eleven (GEMA Consulting Ireland Limited)
    ------------------------------


  • 2.  RE: Copy - Paste Roles and Permissions from one Org to another

    Posted 09-02-2021 04:52
    No replies, thread closed.
    Hi Stan
    GET /api/v2/authorization/roles allows you to retrieve the roles from your test org
    POST /api/v2/authorization/roles  (with the below body) allows you to create the roles in the production org.
    {
    "name": "",
    "description": "",
    "defaultRoleId": "",
    "permissions": [],
    "permissionPolicies": [
    {
    "domain": "",
    "entityName": "",
    "policyName": "",
    "policyDescription": "",
    "actionSet": [],
    "namedResources": [],
    "allowConditions": true,
    "resourceConditionNode": {
    "variableName": "",
    "operator": "",
    "operands": [
    {
    "user": {},
    "queue": {},
    "value": "",
    "type": ""
    }
    ],
    "conjunction": "",
    "terms": [
    {
    "variableName": "",
    "operator": "",
    "operands": [
    {}
    ],
    "conjunction": "",
    "terms": [
    {}
    ]
    }
    ]
    }
    }
    ],
    "userCount": 0,
    "roleNeedsUpdate": true,
    "default": true,
    "base": true
    }

    ------------------------------
    Hichem Agrebi
    hichem.agrebi@cc-expertise.com
    CC-Expertise Ltd
    ------------------------------



  • 3.  RE: Copy - Paste Roles and Permissions from one Org to another

    Posted 09-02-2021 05:34
    No replies, thread closed.

    Hi Hichem

    Thanks so much for your response and appreciate the help. I'm not a developer, so I don't necessarily know what all above does, but will look into it with one of my colleagues and will forward it to the customer. Hopefully this will help someone in the Genesys Community as well. 

    Thanks again and have a great day. 

    Stan



    ------------------------------
    Stan Vasil
    eleven (GEMA Consulting Ireland Limited)
    ------------------------------



  • 4.  RE: Copy - Paste Roles and Permissions from one Org to another

    Posted 02-04-2022 06:09
      |   view attached
    No replies, thread closed.
    Hi @Stan Vasil and @Hichem Agrebi​​,

    I have a similar situation and am using api's to copy some roles from my dev org to prod org .

    to copy role from dev org i am using api : GET /api/v2/authorization/roles
    to create same role in prod i am using api : POST /api/v2/authorization/roles

    After this when i go to prod org and open the newly copied role i see a notice ""Your default role is out of date"" .
    1) if I 'click to see changes' , its just stuck and processing and not showing anything.
    2) dismiss new changes and save but unsure of what will it do?
    3) upon save , the error is going away , but I doubt if it is a correct way ?

    By any chance , did you stumble upon a similar issue ?

    Attaching snapshot :

    ------------------------------
    Garima Balodi
    Accenture Solutions Private Limited
    ------------------------------



  • 5.  RE: Copy - Paste Roles and Permissions from one Org to another

    Posted 04-06-2022 15:20
    No replies, thread closed.
    I am experiencing the same thing, and I found that if you Dismiss Changes, it removes the permissions that were added to the role. I have replicated on the same role multiple times. Import the updates to the role, see the error, dismiss changes, save the role, return to the role and the permissions are gone. Run the API and the permissions are back but so is the error.

    ------------------------------
    Katy Gorman
    PRINCIPAL LIFE INSURANCE COMPANY
    ------------------------------



  • 6.  RE: Copy - Paste Roles and Permissions from one Org to another

    Posted 04-08-2022 07:52
    No replies, thread closed.
    Issue resolved for me. I redid the import, leaving off the default role entry on line 3 that is part of the default body, plus at the bottom of the data, be sure this is set to false. 

    "default": false,

    ------------------------------
    Chris Gorman
    PRINCIPAL LIFE INSURANCE COMPANY
    ------------------------------