login button in contact

we have external system when they login in their system and click on button(it will redirect to our community page). In our contact object, we have button "Log is as user experience".

  1. when we click and login to page where can I find the redirect url?
  2. how salesforce will choose which community to login the user. suppose you have 2 communities. which community will the user be logged?

1 Answer 1


You can see the redirect URL after you click on Log in to Experience as User

https://yourDomain.my.salesforce.com/servlet/servlet.su? with the following parameters:

As you can see above, it knows which Community based on the NetworkId.

In the UI, if you were to have mutliple Communities the Contact/User had access to, it provides a prompt to ask which one you'd like to log into.

  • after you clickling on "Log in to Experience as User " button I am getting the only this url : uat-e-digital-europe.cs129.force.com/s 2) From external system we are login to salesforce through SSO. external system actually goes to communitysignon(apex class) for user creation and existing user access. 3)For creation of users, it goes to createuser method and for the existing user acces, it goes to updateUser method.
    – Abhi Patil
    Commented Sep 21, 2021 at 8:28
  • so where can I get the url ?
    – Abhi Patil
    Commented Sep 21, 2021 at 8:34
  • What I provided is the redirect URL when you click Log in to Experience as User. You can see it yourself if you pay attention to the URL before it resolves to the community URL. However, based on your info, I'm not sure what you're looking for - is this to provide an URL for your internal Salesforce users or are you trying to figure out how to provide a login for your external customers? I'd suggest you edit your question to remove focus on Log in to Experience as User and to provide your implementation details (apex class code, order of flow, etc) and your goal. Commented Sep 21, 2021 at 12:17
  • everything is set up and for internal user and external user. I just want to know how tihis button will work "Log in to Experience as User ". 2) when external user login from their system to salesforce, I want that redirect Url. (what are the parameters we are passing)
    – Abhi Patil
    Commented Sep 21, 2021 at 12:42

You must log in to answer this question.

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