# Create Identity Attribute using API

**URL:** <https://developer.sailpoint.com/discuss/t/create-identity-attribute-using-api/11250>\
**Category:** SHF Discussion and Questions\
**Tags:** apis, sailpoint-identity-security\
**Created:** [May 16, 2023, 5:19pm UTC](https://developer.sailpoint.com/discuss/t/create-identity-attribute-using-api/11250 "2023-05-16T17:19:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ethompson](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/ethompson/32/17298_2.png) [@ethompson](https://developer.sailpoint.com/discuss/u/ethompson)\
**Post date:** [May 16, 2023, 5:19pm UTC](https://developer.sailpoint.com/discuss/t/create-identity-attribute-using-api/11250/1 "2023-05-16T17:19:59Z")

</div>

When using the sp-config to move an Identity Profile, there is an error if any of the Identity Attributes do not exist in the importing tenant.

```auto
"exceptionMessage": "Attributes in Object Config referenced by Attributes on Identity Profiles \"[adDistinguishedName, remainingListOfAttributes...

```

To resolve this required manually typing in the Display Name of each Identity Attribute like so:

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

This calls this endpoint

```auto
https://tenant.api.identitynow.com/shelby/identityAttribute/identityAttributes

```

Is there a way to script this so attributes do not need to be typed out via the UI?

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [June 1, 2023, 1:35pm UTC](https://developer.sailpoint.com/discuss/t/create-identity-attribute-using-api/11250/2 "2023-06-01T13:35:37Z")

</div>

There currently is not a beta or v3 API that will create new identity attributes, and I’m not aware of any CC API that can do this as well. Can you please [submit an idea](https://ideas.sailpoint.com) to add this as a new endpoint to the [identity profiles](https://developer.sailpoint.com/idn/api/v3/identity-profiles) collection, and share the link to the idea here?

---

<div class="post-metadata">

**Author:** ![ethompson](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/ethompson/32/17298_2.png) [@ethompson](https://developer.sailpoint.com/discuss/u/ethompson)\
**Post date:** [June 1, 2023, 5:23pm UTC](https://developer.sailpoint.com/discuss/t/create-identity-attribute-using-api/11250/3 "2023-06-01T17:23:33Z")

</div>

Idea created:

[https://ideas.sailpoint.com/ideas/GOV-I-2605](https://ideas.sailpoint.com/ideas/GOV-I-2605)

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [July 5, 2023, 2:12pm UTC](https://developer.sailpoint.com/discuss/t/create-identity-attribute-using-api/11250/4 "2023-07-05T14:12:44Z")

</div>

It looks like there is a cc API for updating identity attributes. @Ramiro Do you have an example of how to invoke `cc/api/identityAttribute/create`?

---

<div class="post-metadata">

**Author:** ![Ramiro](https://avatars.discourse-cdn.com/v4/letter/r/258eb7/32.png) [@Ramiro](https://developer.sailpoint.com/discuss/u/Ramiro)\
**Post date:** [July 5, 2023, 11:15pm UTC](https://developer.sailpoint.com/discuss/t/create-identity-attribute-using-api/11250/5 "2023-07-05T23:15:25Z")

</div>

Here’s an example for an attribute called Sample Attribute (unsearchable)

POST https://{{org}}.api.identitynow.com/cc/api/identityAttribute/create  
Content-Type: application/json  
Body: {“displayName”:“Sample Attribute”,“multiValued”:false,“namedColumn”:false,“searchable”:false,“silent”:false,“standard”:false,“system”:false,“sources”:[{“properties”:{“ruleName”:“Cloud Promote Identity Attribute”},“type”:“rule”}],“name”:“sampleAttribute”,“type”:“string”}

---

<div class="post-metadata">

**Author:** ![pbourgi](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/pbourgi/32/2072_2.png) [@pbourgi](https://developer.sailpoint.com/discuss/u/pbourgi)\
**Post date:** [July 6, 2023, 6:45am UTC](https://developer.sailpoint.com/discuss/t/create-identity-attribute-using-api/11250/6 "2023-07-06T06:45:53Z")

</div>

If you want to update some fields, you can also first read the identityAttribute like that :

GET https://{{org}}.api.identitynow.com/cc/api/identityAttribute/get?name=sampleAttribute  
Accept: application/json

Then update the existing entry, taking the output from the get and put it into the body of the update method, just modifying displayName or other attribute like “searchable” :

POST https://{{org}}.api.identitynow.com/cc/api/identityAttribute/update?name=sampleAttribute  
Accept: application/json  
Content-Type: application/json  
Body: {“displayName”:“Sample Attribute updated”,“multiValued”:false,“namedColumn”:false,“searchable”:false,“silent”:false,“standard”:false,“system”:false,“sources”:[{“properties”:{“ruleName”:“Cloud Promote Identity Attribute”},“type”:“rule”}],“name”:“sampleAttribute”,“type”:“string”}

---

<div class="post-metadata">

**Author:** ![mcheek](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/mcheek/32/23705_2.png) [@mcheek](https://developer.sailpoint.com/discuss/u/mcheek)\
**Post date:** [August 1, 2023, 3:04pm UTC](https://developer.sailpoint.com/discuss/t/create-identity-attribute-using-api/11250/7 "2023-08-01T15:04:14Z")

</div>

Running into this same issue when trying to import a new identity profile. I’m annoyed that it seems I’ll have to create this manually.

---

<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:** [September 30, 2023, 3:04pm UTC](https://developer.sailpoint.com/discuss/t/create-identity-attribute-using-api/11250/8 "2023-09-30T15:04:30Z")

</div>

Closed on September 30, 2023, 3:04pm UTC

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