We have done integration between .net application and Salesforce.

Currently we are using the primary OAuth endpoints from .net application for authentication:

For production:

For authorization: login.salesforce.com/services/oauth2/authorize For token requests: login.salesforce.com/services/oauth2/token For revoking OAuth tokens: login.salesforce.com/services/oauth2/revoke

For sandbox:

Instead of login.salesforce.com used test.salesforce.com

If I want to integrate .net application with a salesforce org on which custom domain has set up then do I need to change the above urls based on custom domain for each such org?

Can anyone please suggest what are the best practices for handling this?

Thanks in advance.

  • 1
    Only if you have disabled login from login.salesforce.com or test.salesforce.com(You can check that in Setup>My domain), otherwise you can use the endpoints you are using and in return you will get a instance url which is the domain where subsequent requests should go.
    – manjit5190
    Commented Jul 4, 2020 at 19:21

1 Answer 1


It appears it's not required to change the initial endpoints when using a custom domain, as detailed in this post

  • 1
    Welcome to SFSE @ReadyPlayer1! Can you post some of the relevant content from that link? Links tend to break over time making answers without details a bit useless in the long term :)
    – Adrian Larson
    Commented May 24, 2016 at 15:11

You must log in to answer this question.

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