401 Error: Missing sanity.organization.projects/detach Grant When Transferring Project
The error you're seeing indicates that you're missing a specific organization-level permission needed to transfer projects between organizations. Even though you're an admin in both organizations, the Administrator role alone isn't always sufficient for project transfers.
What's Happening
According to the Plans and Payments documentation, to transfer a project between organizations, your role must include these specific permission grants:
sanity.organization.projects.detach(the one you're missing)sanity.project.update
The error message specifically mentions you're lacking the sanity.organization.projects/detach grant on the source organization.
How to Fix This
Verify your organization role: Being a project admin doesn't automatically give you organization-level permissions. You need to be an Administrator at the organization level (not just the project level) in the source organization.
Check in Manage: Go to manage.sanity.io, navigate to the source organization's settings, and verify your role there. You might be a project admin but have a different role at the organization level.
Request proper permissions: If you don't have the Administrator role at the organization level, you'll need someone who does (an organization owner or administrator) to either:
- Grant you the Administrator role in the organization
- Perform the transfer on your behalf
Billing rights: The documentation also mentions that if you have billing rights in both organizations, the transfer happens instantly. Otherwise, it requires approval from a billing manager in the receiving organization.
Important Note
This is a security feature - the sanity.organization.projects.detach permission is intentionally restricted because detaching/transferring projects has significant implications for billing and resource management. It ensures that only users with proper organization-level authority can move projects between organizations.
If you continue having issues after verifying your organization-level permissions, I'd recommend reaching out to Sanity support as they can check your specific account permissions.
Show original thread3 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.