2

We have developed AppExchnage app and is used connected app to integrate 3rd party system with SFDC. This app worked great till one of our customer have asked to install it on their sandbox. 3rd party was just able to connected with SFDC.

When we dig into oAuth flow we found that its issue of & My Domain.

So here is what is happening:

1) From 3rd party app user click connect to SFDC
2) We redirect user to https://test.salesforce.com/services/oauth2/authorize?&response_type=code&client_id=xxxxxxxxxxxxxx&redirect_uri=xxxxxxxxx
3) then it redirects to https://MyDomainxxxxxxxx.cs7.my.salesforce.com/setup/secur/RemoteAccessAuthorizationPage.apexp?source=xxxxxxxxxxxxxx
4)then it should come back to call back URL but goes to https://test.salesforce.com/

When we tried same thing with https://login.salesforce.com/ it just worked fine.

So here is my question: is it a sandbox specific bug ? or Am i missing something?

PS: we have not disabled login from https://test.salesforce.com/ on our My Domain setting.

  • does your callback include sandbox name as described here ? – bananka Apr 24 '15 at 10:24
  • This works fine with login.salesforce.com but not with test.salesforce.com and that is what is confusing. If we use https://<subdomain>.my.​salesforce.com then it works fine but the point remains same... why it work on production and not with sandbox? – AtulRajguru9 Apr 27 '15 at 6:22
  • @AtulRajguru9 : We have had similar issues, when using "generic" domains for login.salesforce.com and test.salesforce.com. Our solution was to change the Authorize Endpoint URL and Token Endpoint URL to include the org specific domain prefix, e.g. customer.my.salesforce.com, or instance prefix, e.g. na24.salesforce.com. The same for sandbox. Basically, skip step (2) in your description, and provide already the right domain, so Salesforce doesn't have to redirect you (and possibly fail). – Nisse Knudsen May 18 '15 at 11:33
  • what was the conclusion to this? – SeanW May 17 at 12:59
  • If i remember it correctly we just created another connected app with on sandbox and used it. – AtulRajguru9 Jun 3 at 5:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.