Skip to main content

How to login to another salesforce Instance from your own Instance

Need to login to other salesforce Instance from your own Instance ?

  
    Here is a simple solution.

Decide service provider and Identity provider
Service Provider  :  Salesforce Instance (A's developer org).
Identity Provider  :  Salesforce Instance (B's developer org).

Identity provider
Step 1 : Create and register a domain in Identity provider organization,  (Domain Management --> B's Domain)

Step 2 : Enable Identity provider. (Security Controls --> Identity Provider)

             Create a dummy certificate (self Signed) and set it as use on communication with service provider.
             Save identity provider settings.

             Download the certificate and saved in a drive.( Need to upload in service provider)
Service Provider
Step 3 : Enable single sign on in service provider (Security Controls > Single Sign-On Settings)
            Upload certificate down loaded from Identity provider.

            Put "Assertion contains the Federation ID from the User object" as "SAML Identity Type" since need to connect IP login name with Federation ID in Service Provider user.

            Put "Identity is in the NameIdentifier element of the Subject statement" SAML Identity Location since need to connect IP login name with Federation ID in Service Provider user.

           Save and note the "Salesforce Login URL".

Identity provider

Step 4 : Define a Connected App for service provider (Create > Apps > Connected Apps Section )
            Give basic information like App name contact email etc.

            Enable "Entity ID".

            ACS URL – Use the Salesforce Login URL from Service Provider
            Save and note the "IdP-Initiated Login URL".
            Add which profiles should be able to access this app.
Service Provider
Step 5 :  Edit Single sign on settings and paste  "IdP-Initiated Login URL" from Step 4 to "Identity Provider Login URL".
User Set up
Step 6 : Copy one of Username from Identity Provider instance to “Federation Id” field of related user in Service Provider.

Identity provider User Interface
Step 7 : Created a custom link "Login To A's Instance" on home page in B's instance .
Working

Login to Identity provider (B). Move to "Home" tab and Click "Login To A's Instance" in narrow column.
Result
             Redirects to A's instance without any separate login.

Comments

Popular posts from this blog

Track Field History for more than 20 fields - Salesforce

All of us would have come across a situation when we need to track more than 20 fields for an object in salesforce. We have raised this Idea around 8 years ago in the success community. But sill it has't implemented by salesforce. But for now, we can achieve it partially with the following workaround. Approach: This approach uses a custom Text field which stores values of multiple other individual fields. Then enabling field history tracking of this field would allow you to track changes for multiple sets of other individual fields. Thus even though remaining within the count limit 20, yet track changes of more than 20 fields. Let us in this example take “Account ”  object and apply the steps to track change in Account Name, Phone, Parent Account and Billing Address all together. Steps: Step 1:  Add a new custom field. Setup -> Customize -> Accounts -> Fields Create a new Text (255) field “ Track FieldHistory ” (Or give any other n...

Customize the columns in the Items to Approve section on home page

We can customize the items to approve section with the help of custom visualforce page. All you need to do is create the below page with your object and respected fields to be displayed and then add the page to a new home page component. Page: <apex:page controller="itemstoApprovecontroller" sidebar="false" showHeader="false">     <apex:form >         <apex:pageBlock title="Incidents/Service Request To Approve">             <apex:pageBlockTable value="{!items_to_approve}" var="item_to_approve">                 <apex:column headerValue="Action" width="160 px" >                                     <apex:commandLink target="_top" value="Reassign |" action="{!REASSIGNnavigation}" style="text-decoration:none;color: #015ba7;" styleClass="cactionLink">   ...

Kanban view for Lightning

Tired of list views? Looking for a dynamic views to show your cases or opportunities in all new way? Here we go,  Salesforce introduced Kanban views for us to have better visibility  of our cases/opportunities and their journey from opening to closure. A case kanban allows you to visually summarize all of the cases for your agents,  by status or priority. It's not only a board, but also a  drag and drop  tool that will help agents keep their cases moving towards resolution. Similarly an opportunity Kanban display opportunities from a particular sales path Let's take a closer look at what all we can do with Kanban Track a Deal with Path Display opportunities by Sales path Move an Opportunity to the Next Stage Take Action on Your Records