# SOD policy creation using API -- /api/v3/create-sod-policy

**URL:** <https://developer.sailpoint.com/discuss/t/sod-policy-creation-using-api-api-v3-create-sod-policy/65083>\
**Category:** SHF Discussion and Questions\
**Tags:** identity-security-cloud\
**Created:** [June 11, 2024, 1:51am UTC](https://developer.sailpoint.com/discuss/t/sod-policy-creation-using-api-api-v3-create-sod-policy/65083 "2024-06-11T01:51:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![saurabhKY](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@saurabhKY](https://developer.sailpoint.com/discuss/u/saurabhKY)\
**Post date:** [June 11, 2024, 1:51am UTC](https://developer.sailpoint.com/discuss/t/sod-policy-creation-using-api-api-v3-create-sod-policy/65083/1 "2024-06-11T01:51:37Z")

</div>

hi,  
i have been trying to write a PS script to bulk load SoD policies. but found out that API is having issue . i can not create SOD policy whatever i try on postman . it always throws error.

```auto
{
    "locale": "en-US",
    "localeOrigin": "DEFAULT",
    "text": "The request was syntactically correct but its content is semantically invalid."
}

```

**this is the body of the request…**

```auto
{
    "description": "The Segregation of Duties has been defined as provided in ----",
    "ownerRef": {
        "type": "IDENTITY",
        "id": "---------------",
        "name": "---, ----"
    },
    "policyQuery": "@access(id:--------------------) AND @access(id:-------------)",
    "compensatingControls": "TBD",
    "correctionAdvice": "TBD",
    "state": "ENFORCED",
    "tags": [],
    "violationOwnerAssignmentConfig": {
        "assignmentRule": null,
        "ownerRef": null
    },
    "scheduled": false,
    "creatorId": "-----------------------",
    "modifierId": null,
    "type": "CONFLICTING_ACCESS_BASED",
    "conflictingAccessCriteria": {
        "leftCriteria": {
            "name": "------------",
            "criteriaList": [
                {
                    "type": "ENTITLEMENT",
                    "id": "------------------",
                    "name": "--------------"
                }
            ]
        },
        "rightCriteria": {
            "name": "------------------",
            "criteriaList": [
                {
                    "type": "ENTITLEMENT",
                    "id": "----------------",
                    "name": "-----------------"
                }
            ]
        }
    },
    "name": "-----------------------"
}

```

---

<div class="post-metadata">

**Author:** ![703hardik](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/703hardik/32/6937_2.png) [@703hardik](https://developer.sailpoint.com/discuss/u/703hardik)\
**Post date:** [June 12, 2024, 12:25pm UTC](https://developer.sailpoint.com/discuss/t/sod-policy-creation-using-api-api-v3-create-sod-policy/65083/2 "2024-06-12T12:25:10Z")

</div>

Hi @saurabhKY,

Few things I noticed you are using the sample body from the documentation including creator Id and and few more attributes you can totally skip them initially when you are troubleshooting.  
Only Include the necessary attributes like name of policy type of policy, the right and left criteria and ensure you are using correct Entitlement ID’s and not adding any more than 50 entitlements in a list.

I hope it works…

---

<div class="post-metadata">

**Author:** ![saurabhKY](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@saurabhKY](https://developer.sailpoint.com/discuss/u/saurabhKY)\
**Post date:** [June 13, 2024, 2:12am UTC](https://developer.sailpoint.com/discuss/t/sod-policy-creation-using-api-api-v3-create-sod-policy/65083/3 "2024-06-13T02:12:28Z")

</div>

@703hardik these i added after too many retries. i should have removed that while posting here… even without these fields it wasnt working .  
after posting here i managed it to work with below payload.

{  
“name”: “-------------”,  
“description”: “The Segregation of Duties has been defined as ---------”,  
“externalPolicyReference”: “”,  
“compensatingControls”: “TBD”,  
“correctionAdvice”: “TBD”,  
“state”: “ENFORCED”,  
“scheduled”: false,  
“tags”: [],  
“type”: “CONFLICTING\_ACCESS\_BASED”,  
“conflictingAccessCriteria”: {  
“leftCriteria”: {  
“name”: “------------”,  
“criteriaList”: [  
{  
“type”: “ENTITLEMENT”,  
“id”: “-------------”  
}  
]  
},  
“rightCriteria”: {  
“name”: “-------”,  
“criteriaList”: [  
{  
“type”: “ENTITLEMENT”,  
“id”: “-------------”  
}  
]  
}  
},  
“ownerRef”: {  
“type”: “IDENTITY”,  
“name”: “----------”,  
“id”: “-------------------------”  
},  
“violationOwnerAssignmentConfig”: {}  
}

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [August 12, 2024, 2:13am UTC](https://developer.sailpoint.com/discuss/t/sod-policy-creation-using-api-api-v3-create-sod-policy/65083/4 "2024-08-12T02:13:08Z")

</div>

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