Transfer ownership broke Sanity Studio login - "unknown user" error

18 replies
Last updated: Nov 29, 2025
So a while back I had transferred ownership of my project from a Sanity account that was created with a GitHub login to one that was created directly with Sanity using an email address -- I had run into issues using login providers elsewhere and decided to stop using them across the board.
So I created a throwaway email, used that to create a Sanity organization, transferred the project to that, deleted the old Sanity account, created a new one using the same email just without the GitHub provider, added that user as an admin on the new org, and deleted the throwaway account. Everything looked good -- I did some front end work on the project and I've been able to deploy that using Netlify. I even updated sanity and built and deployed it.

But I didn't actually try to use Sanity Studio to edit content. This is a little personal blog project that I rarely actually update. So today I tried to log in and am getting "unknown user" errors, both locally and on the
_.sanity.studio URL. I can't find anywhere that stores user credentials -- no cookies, local storage, .env files, etc. All I can find is a 404 error for this URL in the console:
https://covwi5zn.api.sanity.io/v2021-06-07/users/me?tag=sanity.studio.users.get-current
Any ideas how to resolve this?
AI Update

This is a tricky situation, but the good news is you eventually got it working! Based on the similar case I found in Sanity's community answers, this is primarily a browser cookie/cached authentication issue that happened because of the complex account transfer process you went through.

Here's what likely happened: When you switched from a GitHub-authenticated account to an email-based account (even with the same email), Sanity treats these as completely different user identities. During your transfer process, some stale authentication data got cached in Chrome that was pointing to your old GitHub-based identity, which no longer exists. This is why you were seeing the 404 error for https://covwi5zn.api.sanity.io/v2021-06-07/users/me — the browser was sending old credentials for a user that doesn't have access to the project anymore.

How to fix the "unknown user" error:

1. Deep clean your browser data

As you discovered, the standard "clear cookies" isn't always enough. Chrome (and other browsers) can cache authentication data in places that don't show up in DevTools. Here's what to do:

  • Go to Chrome Settings → Privacy and Security → Clear browsing data
  • Select "All time" as the time range
  • Check: Cookies, Cached images and files, and Site settings
  • Important: Also search for "sanity" in the site data section and manually delete anything related to sanity.io or sanity.studio

2. Check your project access

Log into sanity.io/manage with your current email/password account and verify:

  • You can see the project with ID covwi5zn
  • Your current user account is listed as a member with Admin permissions
  • If you can't see the project or aren't listed as a member, that's your root issue

3. If you're locked out completely

If your current account doesn't have access to the project in Manage, you'll need to contact Sanity support. Explain the account transfer sequence you went through. They can verify your ownership (via your Netlify deployments and local project files) and add your current account identity as an admin.

4. Try a different browser temporarily

As you found, Firefox worked when Chrome didn't. This confirms it's browser-specific cached data causing the issue.

Why this happened:

Sanity treats each authentication method as a separate user identity. Your user@example.com via GitHub and user@example.com via email/password are two completely different users in Sanity's system. When you transferred the project between accounts and deleted the intermediary accounts, you likely ended up with a project where the admin user ID doesn't match your current authenticated user ID.

The cookie/authentication issue is a known problem that Sanity has been working on, particularly related to third-party cookie handling in modern browsers.

Pro tip: For future reference, if you need to switch authentication methods, it's safer to add the new account as an admin first, verify access, then remove the old account — rather than doing transfers through intermediary accounts. This avoids getting into situations where you're locked out due to mismatched user identities.

Show original thread
18 replies

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Was this answer helpful?