wlinna
wlinna6d ago

How to clean up Zitadel after botched import

This issues pretty much explains what I tried to do: https://github.com/zitadel/zitadel/issues/10417 0. I exported data from old Zitadel. 1. I tried importing but because the preferred language contained en-u-rg-uszzzz , the import failed 2. After replacing all en-u-rg-uszzzz with en, I tried importing again 3. However, various constraint checks failed and so the imported org missed certain settings and thus the user's lacked the domain 4. I removed the imported organization and tried importing once again, but this time there were even more errors and the organization did not appear at all. Now I am stuck in a situation where I can't see the imported organization in the GUI and no users, but neither can I import it because it exists somewhere internally. I get errors like these:
{
"type": "org",
"id": "281717763746037762",
"message": "ID=COMMA-Bd2jj Message=Errors.Org.Domain.AlreadyExists"
},
{
"type": "domain",
"id": "281717763746037762_my_org@my.domain",
"message": "ID=V2-e1wse Message=Errors.Already.Exists"
},
{
"type": "login_policy",
"id": "281717763746037762",
"message": "ID=Org-FEd32 Message=Errors.IDPConfig.NotExisting"
},
{
"type": "project",
"id": "281717802887282690",
"message": "ID=COMMAND-opamwu Message=Errors.Project.AlreadyExisting"
},
{
"type": "oidc_app",
"id": "281717948026978306",
"message": "ID=PROJECT-lxowmp Message=Errors.Project.App.AlreadyExisting"
},
...
{
"type": "org",
"id": "281717763746037762",
"message": "ID=COMMA-Bd2jj Message=Errors.Org.Domain.AlreadyExists"
},
{
"type": "domain",
"id": "281717763746037762_my_org@my.domain",
"message": "ID=V2-e1wse Message=Errors.Already.Exists"
},
{
"type": "login_policy",
"id": "281717763746037762",
"message": "ID=Org-FEd32 Message=Errors.IDPConfig.NotExisting"
},
{
"type": "project",
"id": "281717802887282690",
"message": "ID=COMMAND-opamwu Message=Errors.Project.AlreadyExisting"
},
{
"type": "oidc_app",
"id": "281717948026978306",
"message": "ID=PROJECT-lxowmp Message=Errors.Project.App.AlreadyExisting"
},
...
GitHub
[Bug]: Import saves data even when it fails · Issue #10417 · zita...
Preflight Checklist I could not find a solution in the documentation, the existing issues or discussions I have joined the ZITADEL chat Environment ZITADEL Cloud Version v3.3.2 Database PostgreSQL ...
4 Replies
Ask Inkeep
Ask Inkeep6d ago
Hi @wlinna, I'm an AI assistant for ZITADEL. While a team member reviews this question, I'll see if I can find relevant sources for your question. Answer I wasn't able to find a direct answer about cleaning up after a botched import, here are some relevant sources: 1. Couldn't import human user that was previously deleted via console : This discussion mentions that import doesn't work for users previously deleted, and suggests the issue is related to ZITADEL checking user IDs even when users don't exist in the console. 2. [Proposal] rework import/export : This issue discusses limitations with the current export/import architecture and suggests workarounds including importing objects without IDs to let ZITADEL generate new ones, or executing against a fresh database. Feel free to tag @Ask Inkeep with additional questions. Got it. Tagging @Rajat for additional help.
wlinna
wlinnaOP6d ago
I suppose it just isn't possibly right now (?)
Rajat
Rajat3d ago
hey @wlinna thaanks for the question, i will look into it
wlinna
wlinnaOP3d ago
I have since then learned that many of those errors occur even when importing to a fresh Zitadel instance. Please see my other thread: https://discord.com/channels/927474939156643850/1413118165151518730

Did you find this page helpful?