# Unable to import JSON

**URL:** <https://community.auth0.com/t/unable-to-import-json/102273>\
**Category:** Get Help\
**Tags:** user-import-export, user-management\
**Created:** [March 10, 2023, 4:01pm UTC](https://community.auth0.com/t/unable-to-import-json/102273 "2023-03-10T16:01:22Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![lizzie-tersano](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lizzie-tersano/32/45328_2.png) [@lizzie-tersano](https://community.auth0.com/u/lizzie-tersano)\
**Post date:** [March 10, 2023, 4:01pm UTC](https://community.auth0.com/t/unable-to-import-json/102273/1 "2023-03-10T16:01:22Z")

</div>

I have been trying to import user data for testing purposes and the user-import-export extension refuses to accept any of the json files. I keep receiving a “An error occured while uploading the file: Bad Request”. Also, “occurred” is misspelled in the error message .

I have:

- Fully read the document at [Bulk User Import Database Schema and Examples](https://auth0.com/docs/manage-users/user-migration/bulk-user-import-database-schema-and-examples).
- Reduced the import to only have user\_id, password\_hash, email, email\_verified, and app\_metadata.

When that did not work, I copy and pasted the basic example at ([Bulk User Import Database Schema and Examples](https://auth0.com/docs/manage-users/user-migration/bulk-user-import-database-schema-and-examples#basic-example)) and it proceeded to return the exact same error.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [March 13, 2023, 1:53pm UTC](https://community.auth0.com/t/unable-to-import-json/102273/3 "2023-03-13T13:53:31Z")

</div>

Hi @lizzie-tersano,

Welcome to the Auth0 Community (and thank you for the spell check!).

Can you please post an example of the request you are making? Be sure to remove sensitive data. Thank you!

---

<div class="post-metadata">

**Author:** ![lizzie-tersano](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lizzie-tersano/32/45328_2.png) [@lizzie-tersano](https://community.auth0.com/u/lizzie-tersano)\
**Post date:** [March 13, 2023, 2:45pm UTC](https://community.auth0.com/t/unable-to-import-json/102273/4 "2023-03-13T14:45:09Z")

</div>

Hello! Thank you for taking the time to get back to me. This is the data format of the json file I attempted to import.

[{  
“user\_id” : “some mongo id number”,  
“email”: “some email address”,  
“email\_verified”: true,  
“app\_metadata” : {  
“roles” : [“admin”]  
},  
“password\_hash” : “$2b$10$6U.VtIlOegEmhfzPHrTsCO/YhPWGWYeKZOlM5YuU1YxGWY7hBo/sW”  
}]

Thanks!

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [March 13, 2023, 3:07pm UTC](https://community.auth0.com/t/unable-to-import-json/102273/5 "2023-03-13T15:07:30Z")

</div>

I am getting a parsing error when I try to validate that JSON.

If you think that is a result of the editor, feel free to use code blocks, or send me the file directly.

---

<div class="post-metadata">

**Author:** ![lizzie-tersano](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lizzie-tersano/32/45328_2.png) [@lizzie-tersano](https://community.auth0.com/u/lizzie-tersano)\
**Post date:** [March 13, 2023, 3:14pm UTC](https://community.auth0.com/t/unable-to-import-json/102273/6 "2023-03-13T15:14:41Z")

</div>

It’s not the Json itself, the embedded editor keeps changing the straight double ticks to slanted ones. Anyways, here is the .txt file as this editor does not allow the import of .json files.  
[user.txt](https://community.auth0.com/uploads/short-url/wLgWCQMILVkZLd0ViJXBjse2kzf.txt) (253 Bytes)

Thank you again for the help!

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [March 13, 2023, 3:30pm UTC](https://community.auth0.com/t/unable-to-import-json/102273/7 "2023-03-13T15:30:05Z")

</div>

Great, thanks for the added info.

I was able to successfully import that user, the only change I made was the file extension (as you mentioned).

Can you confirm that you have enabled an application for the connection you are importing to? It’s mentioned in the docs, but it’s very small.

---

<div class="post-metadata">

**Author:** ![lizzie-tersano](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lizzie-tersano/32/45328_2.png) [@lizzie-tersano](https://community.auth0.com/u/lizzie-tersano)\
**Post date:** [March 13, 2023, 3:51pm UTC](https://community.auth0.com/t/unable-to-import-json/102273/8 "2023-03-13T15:51:28Z")

</div>

It should be, I think. I’ll retrace my steps to see and I’ll get back to you as there appears to be a 504 gateway error when attempting to log into the dashboard. Thank you for the help, much appreciated!

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [March 13, 2023, 6:04pm UTC](https://community.auth0.com/t/unable-to-import-json/102273/9 "2023-03-13T18:04:00Z")

</div>

Sounds good! Please let me know if you there is anything I can do.

---

<div class="post-metadata">

**Author:** ![lizzie-tersano](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lizzie-tersano/32/45328_2.png) [@lizzie-tersano](https://community.auth0.com/u/lizzie-tersano)\
**Post date:** [March 16, 2023, 5:30pm UTC](https://community.auth0.com/t/unable-to-import-json/102273/10 "2023-03-16T17:30:35Z")

</div>

I got it to work! Don’t know exactly why, so this is what I did:

- Defined roles and assigned permissions
- Enabled RBAC Settings

Thank you for taking the time out of your day to help!

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [March 16, 2023, 5:32pm UTC](https://community.auth0.com/t/unable-to-import-json/102273/11 "2023-03-16T17:32:50Z")

</div>

Great! Glad you got it working.

One troubleshooting hint; if you run into issues with the import extension, using the API directly can narrow down the potential problems.

Let us know if you run into anything else!

---

<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:** [March 30, 2023, 5:33pm UTC](https://community.auth0.com/t/unable-to-import-json/102273/12 "2023-03-30T17:33:23Z")

</div>

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