---
id: get-policy-violation-by-id
sidebar_label: Returns a PolicyViolation resource based on id.
hide_title: true
hide_table_of_contents: true
api: {"operationId":"getPolicyViolationById","tags":["PolicyViolations"],"description":"The PolicyViolation resource with matching id is returned.","parameters":[{"name":"policyViolationId","in":"path","schema":{"type":"string"},"description":"The id of the PolicyViolation.","required":true},{"in":"query","name":"attributes","schema":{"type":"string","example":"policyName,constraintName"},"description":"A comma-separated list of attributes to return in the response. This query parameter supersedes excludedAttributes, so providing the same attribute(s) to both will result in the attribute(s) being returned."},{"in":"query","name":"excludedAttributes","schema":{"type":"string","example":"policyName,constraintName"},"description":"A comma-separated list of attributes to exclude from the response. *Some attributes cannot be excluded.*"}],"responses":{"200":{"description":"Returns a PolicyViolation resource based on the id.","content":{"application/json":{"schema":{"properties":{"id":{"description":"IdentityIQ id of the PolicyViolation.","type":"string","example":"c0b4568a4fe7458c434ee77d1fbt156b"},"policyName":{"description":"Name of the Policy this PolicyViolation is associated with.","type":"string","example":"Entitlement Policy with Details"},"constraintName":{"description":"Name of the Constraint this PolicyViolation is associated with.","type":"string","example":"Entitlement Policy with Details"},"identity":{"description":"The Identity (User) that caused the PolicyViolation.","type":"object","properties":{"displayName":{"description":"Display name of the Identity that caused the PolicyViolation.","type":"string","example":"Bob Smith"},"value":{"description":"The id of the Identity which caused the PolicyViolation.","type":"string","example":"c0a7778b7ef71e79817ee74e6a1f0444"},"$ref":{"description":"URI reference to the Identity (User).","type":"string","example":"http://localhost:8080/iiq/scim/v2/Users/c0a7778b7ef71e79817ee74e6a1f0444"}}},"owner":{"description":"The User that owns the Policy.","type":"object","properties":{"displayName":{"description":"Display name of the Policy owner.","type":"string","example":"Bob Smith"},"value":{"description":"The id of the Policy owner.","type":"string","example":"c0a7778b7ef71e79817ee74e6a1f0444"},"$ref":{"description":"URI reference to the Policy owner.","type":"string","example":"http://localhost:8080/iiq/scim/v2/Users/c0a7778b7ef71e79817ee74e6a1f0444"}}},"description":{"description":"Description of the PolicyViolation.","type":"string","example":"Production and development systems should not be available to one person."},"status":{"description":"Status of the PolicyViolation. This can be Open, Mitigated, Remediated, or Delegated.","type":"string","example":"Open"},"meta":{"description":"Metadata of the resource.","properties":{"created":{"description":"Datetime this Resource was created.","type":"string","format":"date-time","example":"2022-02-11T01:34:04.074-05:00"},"location":{"description":"The location of the resource.","type":"string","example":"http://localhost:8080/iiq/scim/v2/Users/c0b4568a4fe7458c434ee77d1fbt156b"},"lastModified":{"description":"Datetime the resource was last modified.","type":"string","format":"date-time","example":"2022-02-11T01:08:45.866-05:00"},"version":{"description":"The version of the resource.","type":"string","example":"W/\"1644561244074\""},"resourceType":{"description":"The SCIM resource type.","type":"string","example":"PolicyViolation"}}},"schemas":{"description":"The schemas involved in the SCIM resource.","type":"array","items":{"type":"string"},"example":["urn:ietf:params:scim:schemas:sailpoint:1.0:PolicyViolation"]}}}},"application/scim+json":{"schema":{"properties":{"id":{"description":"IdentityIQ id of the PolicyViolation.","type":"string","example":"c0b4568a4fe7458c434ee77d1fbt156b"},"policyName":{"description":"Name of the Policy this PolicyViolation is associated with.","type":"string","example":"Entitlement Policy with Details"},"constraintName":{"description":"Name of the Constraint this PolicyViolation is associated with.","type":"string","example":"Entitlement Policy with Details"},"identity":{"description":"The Identity (User) that caused the PolicyViolation.","type":"object","properties":{"displayName":{"description":"Display name of the Identity that caused the PolicyViolation.","type":"string","example":"Bob Smith"},"value":{"description":"The id of the Identity which caused the PolicyViolation.","type":"string","example":"c0a7778b7ef71e79817ee74e6a1f0444"},"$ref":{"description":"URI reference to the Identity (User).","type":"string","example":"http://localhost:8080/iiq/scim/v2/Users/c0a7778b7ef71e79817ee74e6a1f0444"}}},"owner":{"description":"The User that owns the Policy.","type":"object","properties":{"displayName":{"description":"Display name of the Policy owner.","type":"string","example":"Bob Smith"},"value":{"description":"The id of the Policy owner.","type":"string","example":"c0a7778b7ef71e79817ee74e6a1f0444"},"$ref":{"description":"URI reference to the Policy owner.","type":"string","example":"http://localhost:8080/iiq/scim/v2/Users/c0a7778b7ef71e79817ee74e6a1f0444"}}},"description":{"description":"Description of the PolicyViolation.","type":"string","example":"Production and development systems should not be available to one person."},"status":{"description":"Status of the PolicyViolation. This can be Open, Mitigated, Remediated, or Delegated.","type":"string","example":"Open"},"meta":{"description":"Metadata of the resource.","properties":{"created":{"description":"Datetime this Resource was created.","type":"string","format":"date-time","example":"2022-02-11T01:34:04.074-05:00"},"location":{"description":"The location of the resource.","type":"string","example":"http://localhost:8080/iiq/scim/v2/Users/c0b4568a4fe7458c434ee77d1fbt156b"},"lastModified":{"description":"Datetime the resource was last modified.","type":"string","format":"date-time","example":"2022-02-11T01:08:45.866-05:00"},"version":{"description":"The version of the resource.","type":"string","example":"W/\"1644561244074\""},"resourceType":{"description":"The SCIM resource type.","type":"string","example":"PolicyViolation"}}},"schemas":{"description":"The schemas involved in the SCIM resource.","type":"array","items":{"type":"string"},"example":["urn:ietf:params:scim:schemas:sailpoint:1.0:PolicyViolation"]}}}}}}},"method":"get","path":"/PolicyViolations/{policyViolationId}","servers":[{"url":"http://localhost:8080/identityiq/scim/v2","description":"IdentityIQ SCIM server basepath and path to API."}],"security":[{"basicAuth":[]}],"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"}},"info":{"description":"IdentityIQ REST Endpoint Interface Documentation for SCIM\n","version":"8.3","title":"IdentityIQ SCIM REST API"},"postman":{"name":"Returns a PolicyViolation resource based on id.","description":{"content":"The PolicyViolation resource with matching id is returned.","type":"text/plain"},"url":{"path":["PolicyViolations",":policyViolationId"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"A comma-separated list of attributes to return in the response. This query parameter supersedes excludedAttributes, so providing the same attribute(s) to both will result in the attribute(s) being returned.","type":"text/plain"},"key":"attributes","value":""},{"disabled":false,"description":{"content":"A comma-separated list of attributes to exclude from the response. *Some attributes cannot be excluded.*","type":"text/plain"},"key":"excludedAttributes","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) The id of the PolicyViolation.","type":"text/plain"},"type":"any","value":"","key":"policyViolationId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}}
sidebar_class_name: "get api-method"
info_path: iiq/api/identityiq-scim-rest-api
custom_edit_url: "https://github.com/sailpoint-oss/developer.sailpoint.com/issues/new?assignees=&labels=&template=bug-report.md&title=%5BBug%5D+Your+Bug+Report+Here Requesting changes to 'Returns a PolicyViolation resource based on id.' (get-policy-violation-by-id)"
---

import ApiTabs from "@theme/ApiTabs";
import MimeTabs from "@theme/MimeTabs";
import ParamsItem from "@theme/ParamsItem";
import ResponseSamples from "@theme/ResponseSamples";
import SchemaItem from "@theme/SchemaItem";
import SchemaTabs from "@theme/SchemaTabs";
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
import TabItem from "@theme/TabItem";

## Returns a PolicyViolation resource based on id.



The PolicyViolation resource with matching id is returned.

<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"name":"policyViolationId","in":"path","schema":{"type":"string"},"description":"The id of the PolicyViolation.","required":true}}></ParamsItem></ul></div></details><details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Query Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"query","name":"attributes","schema":{"type":"string","example":"policyName,constraintName"},"description":"A comma-separated list of attributes to return in the response. This query parameter supersedes excludedAttributes, so providing the same attribute(s) to both will result in the attribute(s) being returned."}}></ParamsItem><ParamsItem className={"paramsItem"} param={{"in":"query","name":"excludedAttributes","schema":{"type":"string","example":"policyName,constraintName"},"description":"A comma-separated list of attributes to exclude from the response. *Some attributes cannot be excluded.*"}}></ParamsItem></ul></div></details><div><ApiTabs><TabItem label={"200"} value={"200"}><div>

Returns a PolicyViolation resource based on the id.

</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={false} deprecated={undefined} schemaDescription={"IdentityIQ id of the PolicyViolation."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"policyName"} required={false} deprecated={undefined} schemaDescription={"Name of the Policy this PolicyViolation is associated with."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"constraintName"} required={false} deprecated={undefined} schemaDescription={"Name of the Constraint this PolicyViolation is associated with."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>identity</strong><span style={{"opacity":"0.6"}}> object</span></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>

The Identity (User) that caused the PolicyViolation.

</div><SchemaItem collapsible={false} name={"displayName"} required={false} deprecated={undefined} schemaDescription={"Display name of the Identity that caused the PolicyViolation."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"value"} required={false} deprecated={undefined} schemaDescription={"The id of the Identity which caused the PolicyViolation."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"$ref"} required={false} deprecated={undefined} schemaDescription={"URI reference to the Identity (User)."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem></div></details></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>owner</strong><span style={{"opacity":"0.6"}}> object</span></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>

The User that owns the Policy.

</div><SchemaItem collapsible={false} name={"displayName"} required={false} deprecated={undefined} schemaDescription={"Display name of the Policy owner."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"value"} required={false} deprecated={undefined} schemaDescription={"The id of the Policy owner."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"$ref"} required={false} deprecated={undefined} schemaDescription={"URI reference to the Policy owner."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem></div></details></SchemaItem><SchemaItem collapsible={false} name={"description"} required={false} deprecated={undefined} schemaDescription={"Description of the PolicyViolation."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"status"} required={false} deprecated={undefined} schemaDescription={"Status of the PolicyViolation. This can be Open, Mitigated, Remediated, or Delegated."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>meta</strong><span style={{"opacity":"0.6"}}> </span></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>

Metadata of the resource.

</div><SchemaItem collapsible={false} name={"created"} required={false} deprecated={undefined} schemaDescription={"Datetime this Resource was created."} schemaName={"date-time"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"location"} required={false} deprecated={undefined} schemaDescription={"The location of the resource."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"lastModified"} required={false} deprecated={undefined} schemaDescription={"Datetime the resource was last modified."} schemaName={"date-time"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"version"} required={false} deprecated={undefined} schemaDescription={"The version of the resource."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"resourceType"} required={false} deprecated={undefined} schemaDescription={"The SCIM resource type."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem></div></details></SchemaItem><SchemaItem collapsible={false} name={"schemas"} required={false} deprecated={undefined} schemaDescription={"The schemas involved in the SCIM resource."} schemaName={"string[]"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n  \"id\": \"c0b4568a4fe7458c434ee77d1fbt156b\",\n  \"policyName\": \"Entitlement Policy with Details\",\n  \"constraintName\": \"Entitlement Policy with Details\",\n  \"identity\": {\n    \"displayName\": \"Bob Smith\",\n    \"value\": \"c0a7778b7ef71e79817ee74e6a1f0444\",\n    \"$ref\": \"http://localhost:8080/iiq/scim/v2/Users/c0a7778b7ef71e79817ee74e6a1f0444\"\n  },\n  \"owner\": {\n    \"displayName\": \"Bob Smith\",\n    \"value\": \"c0a7778b7ef71e79817ee74e6a1f0444\",\n    \"$ref\": \"http://localhost:8080/iiq/scim/v2/Users/c0a7778b7ef71e79817ee74e6a1f0444\"\n  },\n  \"description\": \"Production and development systems should not be available to one person.\",\n  \"status\": \"Open\",\n  \"meta\": {\n    \"created\": \"2022-02-11T01:34:04.074-05:00\",\n    \"location\": \"http://localhost:8080/iiq/scim/v2/Users/c0b4568a4fe7458c434ee77d1fbt156b\",\n    \"lastModified\": \"2022-02-11T01:08:45.866-05:00\",\n    \"version\": \"W/\\\"1644561244074\\\"\",\n    \"resourceType\": \"PolicyViolation\"\n  },\n  \"schemas\": [\n    \"urn:ietf:params:scim:schemas:sailpoint:1.0:PolicyViolation\"\n  ]\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem><TabItem label={"application/scim+json"} value={"application/scim+json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={false} deprecated={undefined} schemaDescription={"IdentityIQ id of the PolicyViolation."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"policyName"} required={false} deprecated={undefined} schemaDescription={"Name of the Policy this PolicyViolation is associated with."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"constraintName"} required={false} deprecated={undefined} schemaDescription={"Name of the Constraint this PolicyViolation is associated with."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>identity</strong><span style={{"opacity":"0.6"}}> object</span></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>

The Identity (User) that caused the PolicyViolation.

</div><SchemaItem collapsible={false} name={"displayName"} required={false} deprecated={undefined} schemaDescription={"Display name of the Identity that caused the PolicyViolation."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"value"} required={false} deprecated={undefined} schemaDescription={"The id of the Identity which caused the PolicyViolation."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"$ref"} required={false} deprecated={undefined} schemaDescription={"URI reference to the Identity (User)."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem></div></details></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>owner</strong><span style={{"opacity":"0.6"}}> object</span></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>

The User that owns the Policy.

</div><SchemaItem collapsible={false} name={"displayName"} required={false} deprecated={undefined} schemaDescription={"Display name of the Policy owner."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"value"} required={false} deprecated={undefined} schemaDescription={"The id of the Policy owner."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"$ref"} required={false} deprecated={undefined} schemaDescription={"URI reference to the Policy owner."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem></div></details></SchemaItem><SchemaItem collapsible={false} name={"description"} required={false} deprecated={undefined} schemaDescription={"Description of the PolicyViolation."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"status"} required={false} deprecated={undefined} schemaDescription={"Status of the PolicyViolation. This can be Open, Mitigated, Remediated, or Delegated."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>meta</strong><span style={{"opacity":"0.6"}}> </span></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>

Metadata of the resource.

</div><SchemaItem collapsible={false} name={"created"} required={false} deprecated={undefined} schemaDescription={"Datetime this Resource was created."} schemaName={"date-time"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"location"} required={false} deprecated={undefined} schemaDescription={"The location of the resource."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"lastModified"} required={false} deprecated={undefined} schemaDescription={"Datetime the resource was last modified."} schemaName={"date-time"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"version"} required={false} deprecated={undefined} schemaDescription={"The version of the resource."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"resourceType"} required={false} deprecated={undefined} schemaDescription={"The SCIM resource type."} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem></div></details></SchemaItem><SchemaItem collapsible={false} name={"schemas"} required={false} deprecated={undefined} schemaDescription={"The schemas involved in the SCIM resource."} schemaName={"string[]"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n  \"id\": \"c0b4568a4fe7458c434ee77d1fbt156b\",\n  \"policyName\": \"Entitlement Policy with Details\",\n  \"constraintName\": \"Entitlement Policy with Details\",\n  \"identity\": {\n    \"displayName\": \"Bob Smith\",\n    \"value\": \"c0a7778b7ef71e79817ee74e6a1f0444\",\n    \"$ref\": \"http://localhost:8080/iiq/scim/v2/Users/c0a7778b7ef71e79817ee74e6a1f0444\"\n  },\n  \"owner\": {\n    \"displayName\": \"Bob Smith\",\n    \"value\": \"c0a7778b7ef71e79817ee74e6a1f0444\",\n    \"$ref\": \"http://localhost:8080/iiq/scim/v2/Users/c0a7778b7ef71e79817ee74e6a1f0444\"\n  },\n  \"description\": \"Production and development systems should not be available to one person.\",\n  \"status\": \"Open\",\n  \"meta\": {\n    \"created\": \"2022-02-11T01:34:04.074-05:00\",\n    \"location\": \"http://localhost:8080/iiq/scim/v2/Users/c0b4568a4fe7458c434ee77d1fbt156b\",\n    \"lastModified\": \"2022-02-11T01:08:45.866-05:00\",\n    \"version\": \"W/\\\"1644561244074\\\"\",\n    \"resourceType\": \"PolicyViolation\"\n  },\n  \"schemas\": [\n    \"urn:ietf:params:scim:schemas:sailpoint:1.0:PolicyViolation\"\n  ]\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem></ApiTabs></div>