2

When I open Workbench the first time, I get the "Pick Prod/Dev, Pick API version, agree to license" screen, with a "Login with Salesforce" button. When I choose Login, if I have an active session (or sessions) already in the browser, Workbench will pick the most recently started session. If I want to login elsewhere, I have to logout. But it has grabbed my active session - logging out will log me out of all of my other browser tabs in the same org.

Here's a common scenario: I need to do something in two sandboxes (say, dev and uat) using Workbench. Sometimes it's comparing some data, sometimes it's exporting from one and importing to another. Nothing I couldn't do in another tool, but Workbench is easy and convenient. So I'm logged into dev and uat sandboxes, and I launch Workbench. It auto-attaches to my uat session. I export some records, and now I need a Workbench session in my dev org. Opening it in a fresh window and choosing Login will just attach to uat again. Choosing log out will log me out of all active UAT windows in the current session (and there may be several). How can I get Workbench to show me the login window without ending my other session?

I've considered using a second browser, or using an a "private browsing" tab, but I'm hoping there's a built-in way to get Workbench to start a new, clean session.

1
  • i use the two browser approach (Chrome and FFX)
    – cropredy
    Sep 22, 2018 at 4:20

2 Answers 2

1

It's not technically workbench's fault; by default, the Salesforce OAuth2 flow attempts to automatically log in (e.g. if you hit the production login OAuth flow, it automatically selects the most recent session). The solution would be to offer a dialog option to allow a custom domain login instead of just production/sandbox. If you wanted to build this in to your own, you could clone the repo, modify the source, deploy to Heroku, and use your customized version instead. Or, you might want to submit an issue on the repo, or even do a pull request and patch it yourself. I realize that it's not exactly ideal having to customizing the tool this way, but a pull request would probably be a welcome change by the community at large.

2

I must admit, on many sites (including Workbench and Partner Community) I have perfected the dirty art of hitting Esc JUST as it redirects to the domain of the wrong org. Then I replace the domain with the right org, hit enter, and the auth flow hits the org I wanted it to hit.

This is not a GREAT solution but it does work if your timing is good :P

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .