Use Selective Sandbox Access to Limit Access to a Sandbox

Selective Sandbox Access is reshaping how Salesforce professionals work — and this article breaks down everything you need to know.

Look, we’ve all been there. You refresh a sandbox on a Friday afternoon, and suddenly you’re staring at a mountain of manual cleanup because hundreds of users just got access they don’t need, all with those annoying “.invalid” email addresses. Selective Sandbox Access is a simple way to stop that headache before it even starts.

In my experience, managing user access after a refresh is one of those thankless tasks that eats up your Monday morning. But it doesn’t have to be that way. By using a public group to control who gets in, you can keep your environments clean and secure without the manual grind. Honestly, most teams get this wrong by just letting everyone in and dealing with the mess later.

What exactly is Selective Sandbox Access?

It’s a feature that lets you pick exactly who gets access to a sandbox during the creation or refresh process. Instead of Salesforce just dumping every active user from your production org into the new environment, you point it to a public group. Only those people get in. It’s a much cleaner way to handle things.

The best part? Those users keep their real email addresses. Everyone else who isn’t in that group gets brought over as a frozen user with the “.invalid” suffix appended to their email. This is a massive win for security and saves you from having to manually fix emails for your dev team every single time. Let’s break down why this matters.

Setting up Selective Sandbox Access the right way

I’ve seen teams try to manage this on the fly, but the trick is to have your public groups ready before you hit that refresh button. Here is how I usually handle it in the real world:

  • Create a public group in your source org (usually Production) named something clear like “Sandbox Users – Dev Team”.
  • Add the people who actually need to be in there – developers, QA folks, and maybe a few business stakeholders.
  • When you go to create or refresh, look for the sandbox access section and select your public group.

Now, if you are working with different sandbox types, keep in mind that for Developer and Developer Pro sandboxes, using a public group is now mandatory. For Partial and Full sandboxes, you still have the choice, but I’d argue you should always use it to keep things tight.

“I always tell my peers that Selective Sandbox Access isn’t just about convenience; it’s about security. You don’t want a random sales rep accidentally logging into a test environment and seeing dummy data that looks a bit too real.”

A few things that might trip you up

One thing that often trips people up is sandbox cloning. As of the Spring ’25 release, Selective Sandbox Access isn’t available when you’re cloning an existing sandbox. It only applies to new creations or refreshes from a source org. So if you’re cloning, you’re still doing it the old-fashioned way for now.

Also, remember that clarity is the admin’s most valuable contribution. Don’t just make one giant group for everyone in the company. Break them down by project or role so you aren’t over-provisioning access by mistake. It makes your life much easier when a project ends and you need to rotate people out.

Key Takeaways

  • No more email cleanup: Users in your selected public group keep their real email addresses automatically.
  • Tight security: Only the people who need access get it; everyone else stays frozen and unable to log in.
  • Faster refreshes: With fewer active users to process, you’ll often find the sandbox is ready to use much sooner.
  • Mandatory for Dev Orgs: You have to use Selective Sandbox Access for Developer and Developer Pro sandboxes now, so get used to the workflow.

At the end of the day, this is one of those “set it and forget it” features that makes life easier for everyone on the team. If you aren’t using Selective Sandbox Access yet, try it on your next refresh. You’ll save yourself a lot of boring manual work, and your security team will probably thank you for it. It’s a small change that makes a big difference in how you manage your environments.