---
title: Get Policy Groups of Session User
slug: kron-pam-api-collection-3-9-0/get-policy-groups-of-session-user
docTags: 
createdAt: 2026-10-21T06:10:28.166Z
---

{
  "id": "KcRTzK6bAuorB77HduoCg",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "{{url}}/aioc-rest-web/rest/policy/getPolicyGroupsOfSessionUser",
    "name": "",
    "description": "<h3>Request Overview</h3>\n<p>This API lists all policy groups associated with the logged-on user.</p>\n<ul>\n<li>\n<p><strong>dbId</strong>: Unique identifier of the policy group.</p>\n</li>\n<li>\n<p><strong>name</strong>: Name of the policy group.</p>\n</li>\n<li>\n<p><strong>policies</strong>: List of policies within the group, each containing details such as ID, creation date, type, and associated device types.</p>\n</li>\n<li>\n<p><strong>policyKeys</strong>: Keys related to the policies, similar to the policies list.</p>\n</li>\n<li>\n<p><strong>realms</strong>: IDs of realms associated with the policy group.</p>\n</li>\n<li>\n<p><strong>action</strong>: Action to be taken when a policy is triggered.</p>\n</li>\n<li>\n<p><strong>operationMode</strong>: Mode of operation for the policy group.</p>\n</li>\n</ul>\n<p>The response includes policy group details like ID, name, associated policies, realms, and the action to be taken when policies are triggered.</p>",
    "contentType": "application/json",
    "request": {
      "headerParameters": [
        {
          "name": "Content-Type",
          "description": "",
          "default": "application/json",
          "value": "application/json",
          "type": "string"
        },
        {
          "name": "X-XSRF-TOKEN",
          "description": "",
          "default": "{{csrftoken}}",
          "value": "{{csrftoken}}",
          "type": "string"
        }
      ],
      "queryParameters": [],
      "pathParameters": [
        {
          "name": "url",
          "description": "",
          "default": "url",
          "value": "url",
          "type": "string"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "List Policy Groups of Session User",
        "jsonExample": "[\n    {\n        \"dbId\": 376256,\n        \"name\": \"PG_linux\",\n        \"description\": null,\n        \"policies\": [\n            {\n                \"dbId\": 376251,\n                \"userCreate\": \"admin\",\n                \"userUpdate\": null,\n                \"creationDate\": 1581605373075,\n                \"lastUpdate\": null,\n                \"key\": \".*\",\n                \"description\": null,\n                \"userBehaviorRate\": null,\n                \"type\": \"WHITE\",\n                \"deviceTypes\": [\n                    \"linux\"\n                ],\n                \"taskName\": null,\n                \"xmlContent\": null\n            }\n        ],\n        \"policyKeys\": [\n            {\n                \"dbId\": 376251,\n                \"userCreate\": \"admin\",\n                \"userUpdate\": null,\n                \"creationDate\": 1581605373075,\n                \"lastUpdate\": null,\n                \"key\": \".*\",\n                \"description\": null,\n                \"userBehaviorRate\": null,\n                \"type\": \"WHITE\",\n                \"deviceTypes\": [\n                    \"linux\"\n                ],\n                \"taskName\": null,\n                \"xmlContent\": null\n            }\n        ],\n        \"httpPolicies\": [],\n        \"maskingPolicies\": [],\n        \"timeRestrictions\": [],\n        \"realms\": [\n            376291\n        ],\n        \"sendEmail\": false,\n        \"sendSnmp\": false,\n        \"action\": \"GENERATE_ERROR\",\n        \"confirmationText\": null,\n        \"operationMode\": \"OPERATION\",\n        \"userCreate\": \"admin\",\n        \"userUpdate\": null,\n        \"creationDate\": 1581605384541,\n        \"lastUpdate\": null\n    }\n]"
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "DqoBL3ul9c1RHXHFNtm7j",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url {{url}}/aioc-rest-web/rest/policy/getPolicyGroupsOfSessionUser \\\n     --header 'accept: application/json' \\\n     --header 'x-xsrf-token: {{csrftoken}}'"
        },
        {
          "id": "xOqvV5Ce5axhyalLGpXE9",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-xsrf-token\", \"{{csrftoken}}\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/policy/getPolicyGroupsOfSessionUser\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "_We-syKWQrg8JBIyWNOPJ",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/policy/getPolicyGroupsOfSessionUser\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-xsrf-token\"] = \"{{csrftoken}}\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "XkZI28BvEvKg4EcuYAJ6p",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/policy/getPolicyGroupsOfSessionUser\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-xsrf-token': '{{csrftoken}}'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "DqoBL3ul9c1RHXHFNtm7j"
    },
    "results": {
      "languages": [
        {
          "id": "knewoCmK2Mh8RcfiegW4R",
          "language": "200",
          "code": "[\n    {\n        \"dbId\": 376256,\n        \"name\": \"PG_linux\",\n        \"description\": null,\n        \"policies\": [\n            {\n                \"dbId\": 376251,\n                \"userCreate\": \"admin\",\n                \"userUpdate\": null,\n                \"creationDate\": 1581605373075,\n                \"lastUpdate\": null,\n                \"key\": \".*\",\n                \"description\": null,\n                \"userBehaviorRate\": null,\n                \"type\": \"WHITE\",\n                \"deviceTypes\": [\n                    \"linux\"\n                ],\n                \"taskName\": null,\n                \"xmlContent\": null\n            }\n        ],\n        \"policyKeys\": [\n            {\n                \"dbId\": 376251,\n                \"userCreate\": \"admin\",\n                \"userUpdate\": null,\n                \"creationDate\": 1581605373075,\n                \"lastUpdate\": null,\n                \"key\": \".*\",\n                \"description\": null,\n                \"userBehaviorRate\": null,\n                \"type\": \"WHITE\",\n                \"deviceTypes\": [\n                    \"linux\"\n                ],\n                \"taskName\": null,\n                \"xmlContent\": null\n            }\n        ],\n        \"httpPolicies\": [],\n        \"maskingPolicies\": [],\n        \"timeRestrictions\": [],\n        \"realms\": [\n            376291\n        ],\n        \"sendEmail\": false,\n        \"sendSnmp\": false,\n        \"action\": \"GENERATE_ERROR\",\n        \"confirmationText\": null,\n        \"operationMode\": \"OPERATION\",\n        \"userCreate\": \"admin\",\n        \"userUpdate\": null,\n        \"creationDate\": 1581605384541,\n        \"lastUpdate\": null\n    }\n]"
        }
      ],
      "selectedLanguageId": "knewoCmK2Mh8RcfiegW4R"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}