# Export import of Identity Profile

**URL:** <https://developer.sailpoint.com/discuss/t/export-import-of-identity-profile/3736>\
**Category:** SHF Discussion and Questions\
**Created:** [April 7, 2022, 10:48am UTC](https://developer.sailpoint.com/discuss/t/export-import-of-identity-profile/3736 "2022-04-07T10:48:17Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ritu\_Raj](https://avatars.discourse-cdn.com/v4/letter/r/a4c791/32.png) [@Ritu\_Raj](https://developer.sailpoint.com/discuss/u/Ritu_Raj)\
**Post date:** [April 7, 2022, 10:48am UTC](https://developer.sailpoint.com/discuss/t/export-import-of-identity-profile/3736/1 "2022-04-07T10:48:17Z")

</div>

Hi Team,

Task: Identity Profile Export is done from the sp-config API.

1. **Import** is not happening with the help of sp-config API.  
POST https://.api.identitynow.com/beta/sp-config/import/

Getting Response::

```json
{

    "jobId": "8d05fa37-df41-4405-9532-341219c71442",

    "status": "FAILED",

    "type": "IMPORT",

    "message": "java.lang.RuntimeException: Exception communicating with target service: HTTP Error 403 when communicating with URI https://stg04-useast1-diana.accessiq.sailpoint.com/v3/sources/sources/?filters=name+eq+%22Delimited+File+-+Testing+%5Bsource%5D%22 : {\"detailCode\":\"403 Forbidden\",\"trackingId\":\"c30767aebe3b46af84fdcd63f35c65ac\",\"messages\":[{\"locale\":\"en-US\",\"localeOrigin\":\"DEFAULT\",\"text\":\"The server understood the request but refuses to authorize it.\"}],\"causes\":[]}",

    "description": null,

    "expiration": "2022-04-14T09:19:08Z",

    "created": "2022-04-07T09:19:08.652Z",

    "modified": "2022-04-07T09:19:09.236Z",

    "completed": null

}

```

Note:: Everytime getting the same response…

Any need will be helpful.

Kind Regards,  
Ritu Raj Akhauri

---

<div class="post-metadata">

**Author:** ![edmarks](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/edmarks/32/2896_2.png) [@edmarks](https://developer.sailpoint.com/discuss/u/edmarks)\
**Post date:** [April 7, 2022, 9:05pm UTC](https://developer.sailpoint.com/discuss/t/export-import-of-identity-profile/3736/2 "2022-04-07T21:05:16Z")

</div>

“The server understood the request but refuses to authorize it.” is a common error with the JWT. Are you sure you’re using a PAT with ORG\_ADMIN rights for the import system?

---

<div class="post-metadata">

**Author:** ![Ritu\_Raj](https://avatars.discourse-cdn.com/v4/letter/r/a4c791/32.png) [@Ritu\_Raj](https://developer.sailpoint.com/discuss/u/Ritu_Raj)\
**Post date:** [April 8, 2022, 4:37am UTC](https://developer.sailpoint.com/discuss/t/export-import-of-identity-profile/3736/3 "2022-04-08T04:37:35Z")

</div>

Yeah, I am using the PAT Token to do that.

I am able to export and Import - Sources, Transform and Rules but not the Identity Profile.

---

<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:** [April 11, 2022, 3:02pm UTC](https://developer.sailpoint.com/discuss/t/export-import-of-identity-profile/3736/4 "2022-04-11T15:02:06Z")

</div>

@Ritu_Raj ,

Have you tried again recently? I’m wondering if there was a bit of downtime in our services that caused this failure.

---

<div class="post-metadata">

**Author:** ![Ritu\_Raj](https://avatars.discourse-cdn.com/v4/letter/r/a4c791/32.png) [@Ritu\_Raj](https://developer.sailpoint.com/discuss/u/Ritu_Raj)\
**Post date:** [April 12, 2022, 4:51am UTC](https://developer.sailpoint.com/discuss/t/export-import-of-identity-profile/3736/5 "2022-04-12T04:51:31Z")

</div>

Yeah @colin_mckibben I tried it yesterday.

---

<div class="post-metadata">

**Author:** ![ranjanik](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@ranjanik](https://developer.sailpoint.com/discuss/u/ranjanik)\
**Post date:** [April 15, 2022, 8:59pm UTC](https://developer.sailpoint.com/discuss/t/export-import-of-identity-profile/3736/6 "2022-04-15T20:59:31Z")

</div>

I’m seeing the same error when importing Identity\_profile from one tenant into another. Do you have any suggestions on how to resolve this?

---

<div class="post-metadata">

**Author:** ![brennenscott](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/brennenscott/32/23642_2.png) [@brennenscott](https://developer.sailpoint.com/discuss/u/brennenscott)\
**Post date:** [April 19, 2022, 7:53pm UTC](https://developer.sailpoint.com/discuss/t/export-import-of-identity-profile/3736/7 "2022-04-19T19:53:52Z")

</div>

Ran into the same issue when I was moving data over from Sandbox to Production. I noticed there are separate Export/Import API methods for Identity Profiles ([Export](https://developer.sailpoint.com/idn/api/beta/export-identity-profiles), [Import](https://developer.sailpoint.com/idn/api/beta/import-identity-profiles)). This, too, resulted in a failure and did not provide an error code:

```auto
{
    "infos": [],
    "warnings": [],
    "errors": [
        {
            "key": "IDENTITY_PROFILE_IMPORT_FAILED",
            "text": "An error occurred while importing Identity Profile with name 'Test IdentityProfile'",
            "detail": {
                "exceptionMessage": null
            }
        }
    ],
    "importedObjects": []
}

```

I eventually just manually re-created everything in Production.

---

<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:** [April 21, 2022, 1:42am UTC](https://developer.sailpoint.com/discuss/t/export-import-of-identity-profile/3736/8 "2022-04-21T01:42:12Z")

</div>

@Ritu_Raj , I just tried on my tenant and it worked. Here are the steps I took. The only thing to note is that I exported and imported to the same tenant since I don’t have a sandbox set up. If you follow these steps for your two tenants and still have an issue, try exporting and importing to the same tenant and see if it works. We might have a bug here, but I just want to make sure I have as much info as possible to send a proper bug report to engineering.

1. Export the identity profiles from tenant 1

POST https://{tenant1}.api.identitynow.com/beta/sp-config/export  
Body

```json
{
    "description": "Export Profiles",
    "excludeTypes": [
    ],
    "includeTypes": [
        "IDENTITY_PROFILE"
    ]
}

```

Response

```json
{
    "jobId": "0e3ccd2f-700b-4416-b8f5-d3f4db059cce",
    "status": "NOT_STARTED",
    "type": "EXPORT",
    "message": null,
    "description": "Export Profiles",
    "expiration": "2022-04-28T01:25:13.6Z",
    "created": "2022-04-21T01:25:13.6Z",
    "modified": "2022-04-21T01:25:13.6Z",
    "completed": null
}

```

1. Get the export results and save them as a JSON file on your computer.

GET https://{tenant1}.api.identitynow.com/beta/sp-config/export/0e3ccd2f-700b-4416-b8f5-d3f4db059cce/download

Response (abbreviated)

```json
{
    "version": 1,
    "timestamp": "2022-04-21T01:25:15.896063Z",
    "tenant": "devrel",
    "description": "Export Profiles",
    "options": {
        "excludeTypes": [],
        "includeTypes": [
            "IDENTITY_PROFILE"
        ],
        "objectOptions": null
    },
    "objects": [
        {
            "version": 1,
            "self": {
                "name": "Test",
                "id": "2c91808478189d26017822a5b9b80c9e",
                "type": "IDENTITY_PROFILE"
...
...
...

```

1. Import the downloaded file to the new tenant. Make sure to use the appropriate API access token for this new tenant.

cURL command

```nohighlight
curl --location --request POST 'https://{tenant2}.api.identitynow.com/beta/sp-config/import' \
--header 'Authorization: Bearer {access_token}' \
--form 'data=@"/path/to/profile_export.json"'

```

1. Get the status of the import

GET https://{tenant2}.api.identitynow.com/beta/sp-config/import/5b30f2a1-bbb5-4ebd-834d-618f290bddde

Response

```json
{
    "jobId": "5b30f2a1-bbb5-4ebd-834d-618f290bddde",
    "status": "COMPLETE",
    "type": "IMPORT",
    "message": "Download import results for details.",
    "description": null,
    "expiration": "2022-04-28T01:26:45Z",
    "created": "2022-04-21T01:26:45.68Z",
    "modified": "2022-04-21T01:26:53.599Z",
    "completed": "2022-04-21T01:26:53.594Z"
}

```

---

<div class="post-metadata">

**Author:** ![Aastha29](https://avatars.discourse-cdn.com/v4/letter/a/ba8739/32.png) [@Aastha29](https://developer.sailpoint.com/discuss/u/Aastha29)\
**Post date:** [September 5, 2022, 11:14pm UTC](https://developer.sailpoint.com/discuss/t/export-import-of-identity-profile/3736/9 "2022-09-05T23:14:26Z")

</div>

It is not working for 2 tenants

---

<div class="post-metadata">

**Author:** ![chris\_annino](https://avatars.discourse-cdn.com/v4/letter/c/82dd89/32.png) [@chris\_annino](https://developer.sailpoint.com/discuss/u/chris_annino)\
**Post date:** [September 23, 2022, 2:13pm UTC](https://developer.sailpoint.com/discuss/t/export-import-of-identity-profile/3736/10 "2022-09-23T14:13:14Z")

</div>

Hi @colin_mckibben, Unfortunately exporting / importing using the same tenant isn’t really the use case here. @Ritu_Raj @Aastha29 @ranjanik @brennenscott I was able to export and then import into another tenant using the APIs mentioned mentioned in this thread. The error messaging can be improved here as I had to look at the source code to figure out what was wrong. The API documentation could be improved as I used attributes that don’t exist in the docs. Here’s what I changed to get import to work:

- Change the object.authoritativeSource.id to match the source id in the new tenant
- replace the object.identityAttributeConfig.attributeTransforms.transformDefinition.attributes.sourceId attribute name with the attribute `name` and make the value the same as the attribute name value.  
Export

```auto
"attributes": {
    "attributeName": "name",
    "sourceName": "DemoData",
    "sourceId": "2c91808482ccea200182d62ae94961fb"
}

```

becomes this in Import

```auto
"attributes": {
    "attributeName": "name",
    "sourceName": "DemoData",
    "name": "name"
}

```

hope this helps someone in the future.

---

<div class="post-metadata">

**Author:** ![sushantkulkarni](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/sushantkulkarni/32/35213_2.png) [@sushantkulkarni](https://developer.sailpoint.com/discuss/u/sushantkulkarni)\
**Post date:** [September 30, 2022, 4:07am UTC](https://developer.sailpoint.com/discuss/t/export-import-of-identity-profile/3736/11 "2022-09-30T04:07:23Z")

</div>

Hey Chris, is there no way we can automate this? I faced a similar issue trying to update an existing identity profile in production with changes we worked on in sandbox. The import to another environment didn’t work, so we had to do a full manual reconfiguration on production which was extremely tedious (given the number of identity attribute mappings and provisioning configurations involved).

Here’s my [post](https://community.sailpoint.com/t5/IdentityNow-Forum/IdentityNow-Updating-the-Source-and-Identity-Profile-of-an/m-p/221717) on the compass forum which has all the details.

---

<div class="post-metadata">

**Author:** ![sushantkulkarni](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/sushantkulkarni/32/35213_2.png) [@sushantkulkarni](https://developer.sailpoint.com/discuss/u/sushantkulkarni)\
**Post date:** [September 30, 2022, 4:09am UTC](https://developer.sailpoint.com/discuss/t/export-import-of-identity-profile/3736/12 "2022-09-30T04:09:07Z")

</div>

I faced the [same issue,](https://community.sailpoint.com/t5/IdentityNow-Forum/IdentityNow-Updating-the-Source-and-Identity-Profile-of-an/m-p/221717) had no other choice but to do it manually in production.

---

<div class="post-metadata">

**Author:** ![chris\_annino](https://avatars.discourse-cdn.com/v4/letter/c/82dd89/32.png) [@chris\_annino](https://developer.sailpoint.com/discuss/u/chris_annino)\
**Post date:** [September 30, 2022, 1:18pm UTC](https://developer.sailpoint.com/discuss/t/export-import-of-identity-profile/3736/13 "2022-09-30T13:18:34Z")

</div>

Definitely possible you could automate the manual steps I outlined, but a simple find/replace would do the job just as well.  
I understand your pain importing to another environment which is why I felt the need to reply to this thread. Please let me know if my post helps you in the future. - Chris

---

<div class="post-metadata">

**Author:** ![karamkarshrikant](https://avatars.discourse-cdn.com/v4/letter/k/a87d85/32.png) [@karamkarshrikant](https://developer.sailpoint.com/discuss/u/karamkarshrikant)\
**Post date:** [November 3, 2022, 7:16pm UTC](https://developer.sailpoint.com/discuss/t/export-import-of-identity-profile/3736/14 "2022-11-03T19:16:22Z")

</div>

Export and import within same tenant:  
I have tried the export and it worked fine. When I am trying to do import, I am not getting where to specify that its a second copy.  
For example in object options or default reference?  
I am trying to copy export Identity Profile IP1 from Tenant A and Importing in the same tenant Tenant A but need different name: IP2.  
I do not see any option to provide different name.

---

<div class="post-metadata">

**Author:** ![karamkarshrikant](https://avatars.discourse-cdn.com/v4/letter/k/a87d85/32.png) [@karamkarshrikant](https://developer.sailpoint.com/discuss/u/karamkarshrikant)\
**Post date:** [November 3, 2022, 9:32pm UTC](https://developer.sailpoint.com/discuss/t/export-import-of-identity-profile/3736/15 "2022-11-03T21:32:59Z")

</div>

How can we Export Source A from tenant A and import the same source A with different name within same tenant?

---

<div class="post-metadata">

**Author:** ![pmartinezclango](https://avatars.discourse-cdn.com/v4/letter/p/b38774/32.png) [@pmartinezclango](https://developer.sailpoint.com/discuss/u/pmartinezclango)\
**Post date:** [November 7, 2022, 10:35pm UTC](https://developer.sailpoint.com/discuss/t/export-import-of-identity-profile/3736/16 "2022-11-07T22:35:55Z")

</div>

Thanks for sharing @chris_annino . This worked great!

---

<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:** [July 19, 2023, 2:22pm UTC](https://developer.sailpoint.com/discuss/t/export-import-of-identity-profile/3736/17 "2023-07-19T14:22:52Z")

</div>


