# Auth0 import is throwing error: Names must be unique

**URL:** <https://community.auth0.com/t/auth0-import-is-throwing-error-names-must-be-unique/103073>\
**Category:** Get Help\
**Tags:** clients, management-api\
**Created:** [March 22, 2023, 1:31pm UTC](https://community.auth0.com/t/auth0-import-is-throwing-error-names-must-be-unique/103073 "2023-03-22T13:31:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![karthik.jeeva](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/karthik.jeeva/32/50905_2.png) [@karthik.jeeva](https://community.auth0.com/u/karthik.jeeva)\
**Post date:** [March 22, 2023, 1:31pm UTC](https://community.auth0.com/t/auth0-import-is-throwing-error-names-must-be-unique/103073/1 "2023-03-22T13:31:29Z")

</div>

I tried to export auth0 settings, I could do this without any problem but when it comes to import it is throwing error for duplicate clients, is there any workaround to allow duplicate clients getting restored?

---

<div class="post-metadata">

**Author:** ![karthik.jeeva](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/karthik.jeeva/32/50905_2.png) [@karthik.jeeva](https://community.auth0.com/u/karthik.jeeva)\
**Post date:** [March 22, 2023, 5:47pm UTC](https://community.auth0.com/t/auth0-import-is-throwing-error-names-must-be-unique/103073/4 "2023-03-22T17:47:41Z")

</div>

Hi @sebasiaco , thanks for taking this question,  
tried running **a0deploy import -c=config.json --input\_file sample/tenant.yaml --force**  
Still I am getting same error

---

<div class="post-metadata">

**Author:** ![sebasiaco](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sebasiaco/32/45677_2.png) [@sebasiaco](https://community.auth0.com/u/sebasiaco)\
**Post date:** [March 22, 2023, 6:28pm UTC](https://community.auth0.com/t/auth0-import-is-throwing-error-names-must-be-unique/103073/5 "2023-03-22T18:28:20Z")

</div>

Sorry about that. Can you please share the error message? When client already exists, it should be updated by the cli (instead of trying to create it). Thank you.

---

<div class="post-metadata">

**Author:** ![sebasiaco](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sebasiaco/32/45677_2.png) [@sebasiaco](https://community.auth0.com/u/sebasiaco)\
**Post date:** [March 22, 2023, 7:03pm UTC](https://community.auth0.com/t/auth0-import-is-throwing-error-names-must-be-unique/103073/6 "2023-03-22T19:03:07Z")

</div>

```auto
2019-03-01T16:06:12.988Z - error: Problem running command import during stage validate when processing type clients
2019-03-01T16:06:12.989Z - error: There are multiple clients with the same name combinations
      [["My App","My App"]].
       Names must be unique.

```

If you are getting the above error, you’ll need to edit your yaml file to avoid having clients with the same name. The CLI is using name as an identifier, because ids cannot be imported. So the name must be unique. It’s by design, see [Cannot import in YAML format with duplicate client names · Issue #98 · auth0/auth0-deploy-cli · GitHub](https://github.com/auth0/auth0-deploy-cli/issues/98)

---

<div class="post-metadata">

**Author:** ![karthik.jeeva](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/karthik.jeeva/32/50905_2.png) [@karthik.jeeva](https://community.auth0.com/u/karthik.jeeva)\
**Post date:** [March 23, 2023, 1:36am UTC](https://community.auth0.com/t/auth0-import-is-throwing-error-names-must-be-unique/103073/7 "2023-03-23T01:36:02Z")

</div>

> [@sebasiaco](#):
>
> Cannot import in YAML format with duplicate client names · Issue #98 · auth0/auth0-deploy-cli · GitHub

Thanks @sebasiaco for clarifying.

---

<div class="post-metadata">

**Author:** ![karthik.jeeva](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/karthik.jeeva/32/50905_2.png) [@karthik.jeeva](https://community.auth0.com/u/karthik.jeeva)\
**Post date:** [March 23, 2023, 6:51am UTC](https://community.auth0.com/t/auth0-import-is-throwing-error-names-must-be-unique/103073/8 "2023-03-23T06:51:01Z")

</div>

Our infrastructure creates applications and resource servers (api) with same name, so want to know if there is a way to include clientID or any unique identifier in export that would later allow to restore same named entities?

Also we tried directory based export this silently ignores entities with same name and picks only one and restores that alone, so there is no error thrown with this approach, unfortunately this also will not help us.

Command ran for directory approach

> a0deploy export -c config.json -f directory -o ./sampleDir

> a0deploy import -c config.json -i ./sampleDir

Any solution or workaround in supporting restoring entities with same name would be great help.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [April 6, 2023, 6:51am UTC](https://community.auth0.com/t/auth0-import-is-throwing-error-names-must-be-unique/103073/9 "2023-04-06T06:51:51Z")

</div>

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