7

From the "Subscribers" / "Subscriber Support" tab included with the License Management Application (for ISVforce and OEM partners), Partners can see an overview of a given customer/Subscriber's org, including information about how the Partner is using the Partner's packages. Getting to this "Partner Black tab" view is initiated by searching for the appropriate org, and then clicking on a link in the org's row.

I want to be able to perform this login without using the Subscribers tab, e.g. from a custom Licenses overview page in our LMO. While the Subscribers tab is nice, I want to have a unified/consolidated view of Licenses and Subscribers, all in one table.

So --- to do this, naturally, I started by copying the link from one of the rows in the Subscribers table, and tried to deconstruct it to see if I have the information I need to construct the link dynamically from data stored in the sfLma__License__c object. I can ALMOST do this, but there's a CONFIRMATIONTOKEN at the end of the link, and I do not know where this comes from or how to dynamically construct it, if it's even possible.

Does anyone know how to construct this CONFIRMATIONTOKEN dynamically?

URL format:

https://<instance>.salesforce.com/servlet/servlet.PartnerLoginLmoServlet
?pbtpackid=<packageId, obtainable from Package record>
&pbtsoid=<subscriberOrgId, obtainable from License record>
&pbtpackvid=<packageVersionId, obtainable from Package Version record>
&destination=b
&_CONFIRMATIONTOKEN=<??? HOW IS THIS CALCULATED / WHERE DOES IT COME FROM ???>

3 Answers 3

4

Afraid this isn't going to be possible. When you view a subscriber, a separate session is launched on the subscriber org's instance so you can view data about that org. The confirm token initiates that request. The tokens change, so there is nothing you can hardcode, derive to construct the URL.

3
  • 1
    Understood, but surely there is a formula used to generate this Confirmation Token, based on other License/Subscriber/PackageVersion/Session data, each time that the Subscriber Support tab is loaded? We're all programmers here --- auto-generated tokens come from somewhere... right now I'm contemplating doing a dynamic PageReference.getContent() on the Subscriber Support VF page, and then screen-scraping, each time my custom Licenses Tab is loaded. Knowing the formula that produces the ConfirmationToken would be a lot easier :)
    – zachelrath
    Mar 25, 2013 at 13:58
  • @zachelrath yes we're all programmers here, it would lot easier if we had the confirmationtoken logic (ie formula). Thanks for this detailed post, I was looking for and was trying same thing and then found your post. Please do share the screen-scraping thing that you already built. Mar 23, 2018 at 18:23
  • @ChiragMehta See my answer that I posted below, there IS a way to do this programmatically, without even having to use the Custom Button provided in the LMA package. You could initiate this login from anywhere using the URL I posted in my answer.
    – zachelrath
    Jun 5, 2019 at 18:31
2

There's a button available on the License object, we just need to update the License page layout and add the button "Login into Subscriber Console" to layout.

This button exactly does what we looking for, it opens the organisation details page (the same page that we open by clicking on Org name in Subscriber results/rows).

[Update:9 Oct 2019] You can further extend the button into a custom field and made it show as a link, and then add that field in Search Layouts so you can click on the same (from search results or related list) and directly login to customer org.

1

It is possible by going to the following relative URL when logged in to your License Management Organization (LMO), passing in the desired target Subscriber Org Id:

/partnerbt/lmo/subOrgLogin.apexp?directLoginOrgId={{{sfLma__Subscriber_Org_ID__c}}}

I have been using this for years, it has been extremely helpful for my company as an ISV partner. I found this originally by looking at the code for the "Login to Subscriber Console" Custom Button's associated Visualforce Page (sfLma__LoginToPartnerBT is the name of the VF Page) that's provided on the License detail page in the License Management Application. In that VF Page, the following line initiates a URL redirect using URLFOR(), which we just extracted:

var popupUrl = removeParam('{!URLFOR('/partnerbt/lmo/subOrgLogin.apexp',null,[directLoginOrgId=sfLma__License__c.sfLma__Subscriber_Org_ID__c])}','isdtp');
window.open(popupUrl,'_blank');
1
  • ok cool, yes its the same thing which is coded in the "Login to Subscriber Console" Custom Button's. I've already created a custom field and made it show as a link, so I can click on same (from search results) and directly login to customer org. Jun 10, 2019 at 8:37

You must log in to answer this question.

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