# Null identity on create access profile API

**URL:** <https://developer.sailpoint.com/discuss/t/null-identity-on-create-access-profile-api/214764>\
**Category:** SHF Discussion and Questions\
**Tags:** identities, access-profiles, sailpoint-identity-security, apis\
**Created:** [June 25, 2026, 6:51pm UTC](https://developer.sailpoint.com/discuss/t/null-identity-on-create-access-profile-api/214764 "2026-06-25T18:51:09Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![cris-developer](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@cris-developer](https://developer.sailpoint.com/discuss/u/cris-developer)\
**Post date:** [June 25, 2026, 6:51pm UTC](https://developer.sailpoint.com/discuss/t/null-identity-on-create-access-profile-api/214764/1 "2026-06-25T18:51:09Z")

</div>

Hello, everyone

I’m trying to create a script to automate the creation of access profiles on my ISC enviroment, i followed the sailpoint documentation to build the script and also tried to do the request through a http client (insomnia) but i always get the following error:

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/1/1/11654fedeb9431da130945cd69d9d6e99ffb17ce.png)

I already checked the content and tried diferent identities that are being used as owners in others existing access profiles, here is the script i’m trying to execute:

```auto
import csv

import subprocess

import requests

import json

# ===== CONFIG =====

BASE_URL = "https://my-tenant.api.identitynow.com"

CLIENT_ID = "my-client-id"

CLIENT_SECRET = "my-client-secret"

CSV_FILE = "entitlements.csv"

def get_token():

    url = f"{BASE_URL}/oauth/token"

    payload = {

        "grant_type": "client_credentials",

        "client_id": CLIENT_ID,

        "client_secret": CLIENT_SECRET

    }

    response = requests.post(url, data=payload)

    if response.status_code != 200:

        raise Exception(f"Erro ao gerar token: {response.text}")

    return response.json()["access_token"]

def criar_access_profile(linha, token):

    name = linha["name"].strip()

    description = linha["description"].strip() or f"Acesso {linha['name']}"

    source_id = linha["sourceId"]

    entitlement_id = linha["entitlementId"]

    name = name.replace("|", "-")

    payload = json.dumps({

        "name": name,

        "description": description,

        "enabled": True,

        "owner": {

            "type": "IDENTITY",

            "id": "d4ca5a081b154a5d9174578ec0586064",

            "name": "Leticia Ferreira"

        },

        "source": {

            "id": source_id,

            "type": "SOURCE",

            "name": "Active Directory"

        },

        "entitlements": [

            {

            "type": "ENTITLEMENT",

            "id": entitlement_id,

            "name": name

            }

        ],

        "requestable": True,

        "accessRequestConfig": {

            "commentsRequired": True,

            "denialCommentsRequired": True,

            "reauthorizationRequired": True,

            "requireEndDate": True,

            "maxPermittedAccessDuration": {

            "value": 6,

            "timeUnit": "MONTHS"

            },

            "approvalSchemes": [

            {

                "approverType": "GOVERNANCE_GROUP",

                "approverId": "b95932c7-251e-4343-8232-f9acfdcf10eb"

            }

            ]

        },

        "revocationRequestConfig": {

            "approvalSchemes": [

            {

                "approverType": "GOVERNANCE_GROUP",

                "approverId": "b95932c7-251e-4343-8232-f9acfdcf10eb"

            }

            ]

        },

    })

    command = [

        "curl",

        "-s",

        "-X", "POST",

        f"{BASE_URL}/v3/access-profiles",

        "-H", "Content-Type: application/json",

        "-H", f"Authorization: Bearer {token}",

        "-d", payload

    ]

    result = subprocess.run(command, capture_output=True, text=True)

    if result.returncode == 0:

        print(f"✅ Criado: {name}")

        

        if result.stdout:

            print(f"🔎 Response: {result.stdout}")

    else:

        print(f"❌ Erro ao criar {name}: {result.stderr}")

def processar():

    token = get_token()

    with open(CSV_FILE, newline='', encoding='utf-8-sig') as file:

        reader = csv.DictReader(file)

        for linha in reader:

            try:

                criar_access_profile(linha, token)

            except Exception as e:

                print(f"❌ Erro linha {linha}: {str(e)}")

if __name__ == " __main__":

    processar()

```

---

<div class="post-metadata">

**Author:** ![trettkowski](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/trettkowski/32/36103_2.png) [@trettkowski](https://developer.sailpoint.com/discuss/u/trettkowski)\
**Post date:** [June 25, 2026, 6:58pm UTC](https://developer.sailpoint.com/discuss/t/null-identity-on-create-access-profile-api/214764/2 "2026-06-25T18:58:11Z")

</div>

Hi @cris-developer

Try removing the “name” field from your owner object in the payload. Name isn’t required and if you set it, it needs to match up perfectly or it will throw a 400 error. I recommend just not including it since this is a create (POST) and not needed.

Before:

```auto
        "owner": {

            "type": "IDENTITY",

            "id": "d4ca5a081b154a5d9174578ec0586064",

            "name": "Leticia Ferreira"

        }

```

After:

```auto
        "owner": {

            "type": "IDENTITY",

            "id": "d4ca5a081b154a5d9174578ec0586064"

        }

```

---

<div class="post-metadata">

**Author:** ![cris-developer](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@cris-developer](https://developer.sailpoint.com/discuss/u/cris-developer)\
**Post date:** [June 25, 2026, 7:10pm UTC](https://developer.sailpoint.com/discuss/t/null-identity-on-create-access-profile-api/214764/3 "2026-06-25T19:10:56Z")

</div>

Hi, @trettkowski

I just tried to follow your advice and i still get the same error

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/2/f/2f14092dc14593f90d6b92418ab7c32d9c88dd5f.png)

---

<div class="post-metadata">

**Author:** ![HussainshaSyed001](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/hussainshasyed001/32/28234_2.png) [@HussainshaSyed001](https://developer.sailpoint.com/discuss/u/HussainshaSyed001)\
**Post date:** [June 25, 2026, 8:19pm UTC](https://developer.sailpoint.com/discuss/t/null-identity-on-create-access-profile-api/214764/4 "2026-06-25T20:19:38Z")

</div>

Are you sure are you using identity id of owner? or using account id? Please check on that and also check having any identity errors for the passing owner id

---

<div class="post-metadata">

**Author:** ![cris-developer](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@cris-developer](https://developer.sailpoint.com/discuss/u/cris-developer)\
**Post date:** [June 25, 2026, 8:36pm UTC](https://developer.sailpoint.com/discuss/t/null-identity-on-create-access-profile-api/214764/5 "2026-06-25T20:36:22Z")

</div>

yes im sure, look to the prints bellow

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/5/6/566a1819f9ae5f6e0606fe0ac4069af0c64eaf81.png)

---

<div class="post-metadata">

**Author:** ![cris-developer](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@cris-developer](https://developer.sailpoint.com/discuss/u/cris-developer)\
**Post date:** [June 25, 2026, 8:37pm UTC](https://developer.sailpoint.com/discuss/t/null-identity-on-create-access-profile-api/214764/6 "2026-06-25T20:37:06Z")

</div>

![image](https://global.discourse-cdn.com/sailpoint/original/3X/2/c/2c648d7bc8ac9923a0544231d9f8ee0929aae2eb.png)

---

<div class="post-metadata">

**Author:** ![trettkowski](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/trettkowski/32/36103_2.png) [@trettkowski](https://developer.sailpoint.com/discuss/u/trettkowski)\
**Post date:** [June 25, 2026, 8:43pm UTC](https://developer.sailpoint.com/discuss/t/null-identity-on-create-access-profile-api/214764/7 "2026-06-25T20:43:33Z")

</div>

Interesting, looks like your inputs are correct.

You’re using a PAT (Personal Access Token) for your clientid/clientsecret, correct?

---

<div class="post-metadata">

**Author:** ![HussainshaSyed001](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/hussainshasyed001/32/28234_2.png) [@HussainshaSyed001](https://developer.sailpoint.com/discuss/u/HussainshaSyed001)\
**Post date:** [June 25, 2026, 8:43pm UTC](https://developer.sailpoint.com/discuss/t/null-identity-on-create-access-profile-api/214764/8 "2026-06-25T20:43:57Z")

</div>

ok let us do some new experiment, try this API for creation …/access-profiles/v1

> **[create-access-profile-v-1 | SailPoint Developer Community](https://developer.sailpoint.com/docs/api/create-access-profile-v-1/)**
>
> The SailPoint Developer Community has everything you need to build, extend, and automate scalable identity solutions.

---

<div class="post-metadata">

**Author:** ![cris-developer](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@cris-developer](https://developer.sailpoint.com/discuss/u/cris-developer)\
**Post date:** [June 25, 2026, 8:46pm UTC](https://developer.sailpoint.com/discuss/t/null-identity-on-create-access-profile-api/214764/9 "2026-06-25T20:46:40Z")

</div>

yes, im using client id and secret for PAT.

---

<div class="post-metadata">

**Author:** ![cris-developer](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@cris-developer](https://developer.sailpoint.com/discuss/u/cris-developer)\
**Post date:** [June 25, 2026, 8:47pm UTC](https://developer.sailpoint.com/discuss/t/null-identity-on-create-access-profile-api/214764/10 "2026-06-25T20:47:22Z")

</div>

Also tried this one, the same return.

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/1/9/19eae18161a7e87fde2a2239725af1b316c587ef.png)

---

<div class="post-metadata">

**Author:** ![HussainshaSyed001](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/hussainshasyed001/32/28234_2.png) [@HussainshaSyed001](https://developer.sailpoint.com/discuss/u/HussainshaSyed001)\
**Post date:** [June 25, 2026, 8:51pm UTC](https://developer.sailpoint.com/discuss/t/null-identity-on-create-access-profile-api/214764/11 "2026-06-25T20:51:47Z")

</div>

ok call Get, /identities/id (pass owener id here ) let us know what is response

---

<div class="post-metadata">

**Author:** ![HussainshaSyed001](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/hussainshasyed001/32/28234_2.png) [@HussainshaSyed001](https://developer.sailpoint.com/discuss/u/HussainshaSyed001)\
**Post date:** [June 25, 2026, 8:56pm UTC](https://developer.sailpoint.com/discuss/t/null-identity-on-create-access-profile-api/214764/12 "2026-06-25T20:56:35Z")

</div>

Also check any id is taken form SandBox but api call you are making prod or also check sourceID entIDs belong to the same tenant you are calling.

---

<div class="post-metadata">

**Author:** ![cris-developer](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@cris-developer](https://developer.sailpoint.com/discuss/u/cris-developer)\
**Post date:** [June 25, 2026, 8:56pm UTC](https://developer.sailpoint.com/discuss/t/null-identity-on-create-access-profile-api/214764/13 "2026-06-25T20:56:54Z")

</div>

for some reason returned a 403 code, but my credetials has all scopes included

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/1/9/19071aba6b0122efb86083564749dbae937df457.png)

---

<div class="post-metadata">

**Author:** ![HussainshaSyed001](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/hussainshasyed001/32/28234_2.png) [@HussainshaSyed001](https://developer.sailpoint.com/discuss/u/HussainshaSyed001)\
**Post date:** [June 25, 2026, 8:57pm UTC](https://developer.sailpoint.com/discuss/t/null-identity-on-create-access-profile-api/214764/14 "2026-06-25T20:57:43Z")

</div>

You found the root cause now enjoy!

---

<div class="post-metadata">

**Author:** ![cris-developer](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@cris-developer](https://developer.sailpoint.com/discuss/u/cris-developer)\
**Post date:** [June 25, 2026, 9:03pm UTC](https://developer.sailpoint.com/discuss/t/null-identity-on-create-access-profile-api/214764/15 "2026-06-25T21:03:00Z")

</div>

it doesn’t make sense, my credentials already has the scope needed

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/9/a/9a01c5b711ab5287a2d37b03491be2d73389769e.png)

---

<div class="post-metadata">

**Author:** ![HussainshaSyed001](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/hussainshasyed001/32/28234_2.png) [@HussainshaSyed001](https://developer.sailpoint.com/discuss/u/HussainshaSyed001)\
**Post date:** [June 25, 2026, 9:04pm UTC](https://developer.sailpoint.com/discuss/t/null-identity-on-create-access-profile-api/214764/16 "2026-06-25T21:04:52Z")

</div>

This actually does, do one thing remove all, just use scope:all

---

<div class="post-metadata">

**Author:** ![cris-developer](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@cris-developer](https://developer.sailpoint.com/discuss/u/cris-developer)\
**Post date:** [June 25, 2026, 9:09pm UTC](https://developer.sailpoint.com/discuss/t/null-identity-on-create-access-profile-api/214764/17 "2026-06-25T21:09:30Z")

</div>

I created a new one just with scope:all  
still getting 403

---

<div class="post-metadata">

**Author:** ![trettkowski](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/trettkowski/32/36103_2.png) [@trettkowski](https://developer.sailpoint.com/discuss/u/trettkowski)\
**Post date:** [June 25, 2026, 9:16pm UTC](https://developer.sailpoint.com/discuss/t/null-identity-on-create-access-profile-api/214764/18 "2026-06-25T21:16:02Z")

</div>

Is your ISC account an ORG\_ADMIN?

---

<div class="post-metadata">

**Author:** ![cris-developer](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@cris-developer](https://developer.sailpoint.com/discuss/u/cris-developer)\
**Post date:** [June 25, 2026, 9:18pm UTC](https://developer.sailpoint.com/discuss/t/null-identity-on-create-access-profile-api/214764/19 "2026-06-25T21:18:50Z")

</div>

Yes, my account has administrator permissions

---

<div class="post-metadata">

**Author:** ![trettkowski](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/trettkowski/32/36103_2.png) [@trettkowski](https://developer.sailpoint.com/discuss/u/trettkowski)\
**Post date:** [June 25, 2026, 9:24pm UTC](https://developer.sailpoint.com/discuss/t/null-identity-on-create-access-profile-api/214764/20 "2026-06-25T21:24:56Z")

</div>

You said you’re using a PAT ( icon in the top right → Preferences → Personal Access Tokens), but in your screenshot you look to be on the API Client page instead for selecting scopes.

API Clients are not PATs. You need a personal access token for most endpoints in ISC as they require an identity to be the creator/modifier for audit/logging.

[Next page](https://developer.sailpoint.com/discuss/t/null-identity-on-create-access-profile-api/214764.md?page=2)
