05 July 2019

Using Single Sign-on with Trailhead

In March, Trailhead introduced a new identity service called Trailblazer ID (TBID). This innovation enables Salesforce to create a foundation for unifying community properties such as Trailhead and the Trailblazer Community. But under the covers, there are a number of incredible innovations, one of which I'm asked about at least once per week -

"Can I single sign-on (SSO) and deep link to content on Trailhead without having my users login to Salesforce first and navigate through the site?" 

The short answer is, YES!

There is one important caveat, of the four login types including Salesforce, Google, LinkedIn, and Email, this solution will only work with your Salesforce login.

Trailblazer ID Login Options

As a result, you need to link your Trailhead account using a Salesforce org login to make SSO work. This is because it gives TBID enough information about who you are to log you in correctly using our SSO solution.

The following excerpt is customized from the myTrailhead Help & Training docs (I can't take credit for that writing - the myTrailhead doc writer deserves all the credit) that describes how to create an SSO deep link to content on myTrailhead. However, with one small change described in this blog post, it works for Trailhead as well.

myTrailhead Help & Training Docs

The second section of this blog post describes how you can apply that deep link using a simple formula customization built on top of Trail Tracker to make it 'button click' easy to access content on Trailhead as a logged in user.

Let's say you work at the Pacifica company, and you want to single sign-on an Administrator to the Advanced Formulas module on Trailhead. You can build a link that initiates the necessary relays to confirm that a user is authenticated and then takes the user to the module.

For example, this SSO link leads to the Advanced Formulas module on Trailhead.


Follow this process to build the link.

Navigate to the Trailhead content that you want to link to, such as the Advanced Formulas module.

Keep the page open in a browser so that you can refer to it. The URL contains some of the details required to create the SSO link.

Example: https://trailhead.salesforce.com/content/learn/modules/advanced_formulas/

Advanced Formulas Module - Logged In User

This URL contains the following information for building an SSO link.

Trailblazer ID Communitytrailhead
Namespace namelearn
Content typemodules
Content API nameadvanced_formulas
Name the online location of the relay servicetrailblazer.me

Example: https://trailblazer.me

Add the relay prompt that initiates SSO authentication: /relay?.

Example: https://trailblazer.me/relay?

Now tell the relay where to go by adding community=trailhead.

Example: https://trailblazer.me/relay?community=trailhead

Add an ampersand (&) and one of the following, depending on whether My Domain is set up in your Salesforce org.

If My Domain is set up in your Salesforce org, add mydomain= and your My Domain name, such as pacificalearning.

If My Domain is not set up in your Salesforce org, add instance= and the instance where your Salesforce org is located, such as na57.


With My Domain:


Without My Domain:


NOTE To determine if My Domain is set up in your Salesforce org, navigate to Setup > My Domain. If your org uses My Domain, the domain name is on that page. To determine the instance where your Salesforce org is located, in your org, navigate to Setup > Company Information.
You’ve built the part of the link that confirms whether the user is authenticated through SSO. Now add the path to the content where you want to take your users.

Add &path=/content/.


With My Domain:


Without My Domain:


To add the path to the content, refer to the URL that you navigated to in step 1. Add:
The content type, such as modules/ or trails/.
Your namespace name, such as pacificalearning/
The content API name, such as advanced_formulas


With My Domain:


Without My Domain:


Now you’ve created the SSO authentication link that you can send to your users!

But how would you use this in the real world?

You could use this to generate links using an Excel formula and sending the links out via branded emails as invitations to complete Trailhead badges. The downside of this solution is that if you haven't logged into your organization yet, you'll have to first login since we don't have enough information from your email alone to log you into Trailhead.

Another way you could auto-generate these SSO deep links to Trailhead content is to build a formula field in your org with Trail Tracker. I like this approach over email because it guarantees that you're already logged into your Salesforce organization.

Button Click using Single Sign-on to a Trailhead Module

The flow is pretty straight forward: when you view a badge record, you can click on a custom field, in this case called Single Sign-on URL, it will login you into Trailhead automatically and navigate to the Advanced Formulas module. And if you haven't already registered as a Trailhead user, don't worry, TBID will take you through the progressive profile to create a new user and then return you to the Advanced Formulas module when you're done.

To create the field, you just need to go to Setup as an Administrator and under the Badge object, create a new formula field called Single Sign-on URL.

Badge Formula Field

The following formula is a starting point for trying this out in your org. It checks the type of badge (If Module, Then Project, Then Superbadge, Else "None") and then constructs the SSO URL by parsing the standard trailheadapp__URL__c field that comes with the Trail Tracker App.


IF (ISPICKVAL(trailheadapp__Type__c, 'Module'), HYPERLINK('https://trailblazer.me/relay?community=trailhead&mydomain=pacificalearning&path=/content/learn/modules/'&IF(BEGINS( trailheadapp__URL__c , "https://"), MID( trailheadapp__URL__c , FIND('https://',  trailheadapp__URL__c , 1)+50, (LEN( trailheadapp__URL__c ) - FIND('https://',  trailheadapp__URL__c , 1)+50)),  trailheadapp__URL__c  ),  Name  , '_blank'),IF (ISPICKVAL(trailheadapp__Type__c, 'Project'), HYPERLINK('https://trailblazer.me/relay?community=trailhead&mydomain=pacificalearning&path=/content/learn/projects/'&IF(BEGINS( trailheadapp__URL__c , "https://"), MID( trailheadapp__URL__c , FIND('https://',  trailheadapp__URL__c , 1)+50, (LEN( trailheadapp__URL__c ) - FIND('https://',  trailheadapp__URL__c , 1)+50)),  trailheadapp__URL__c  ),  Name  , '_blank'),IF (ISPICKVAL(trailheadapp__Type__c, 'Superbadge'), HYPERLINK('https://trailblazer.me/relay?community=trailhead&mydomain=pacificalearning&path=/content/learn/superbadges/'&IF(BEGINS( trailheadapp__URL__c , "https://"), MID( trailheadapp__URL__c , FIND('https://',  trailheadapp__URL__c , 1)+56, (LEN( trailheadapp__URL__c ) - FIND('https://',  trailheadapp__URL__c , 1)+56)),  trailheadapp__URL__c  ),  Name  , '_blank'), "none")))

That's the power of the Salesforce platform. From there, you can introduce this link in Login Flows, Workflows, Notifications, Reports, and pretty much anywhere the formula can be presented to a user.

Single Sign-on to Trailhead from your Salesforce organization is possible to help you ramp your team on Salesforce.


  1. Nice information thank you,if you want more information please visit our link salesforce certification

    1. Great Article
      Cyber Security Projects

      projects for cse

      Networking Security Projects

      JavaScript Training in Chennai

      JavaScript Training in Chennai

      The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

    2. Need The To Hire A Hacker❓ Then contact PYTHONAX✅

      The really amazing deal about contacting PYTHONAX is that the Hack done by us can’t get traced to you, as every Hacking job we do is strongly protected by our Firewall. It’s like saying if anyone tries to trace the Hack, it will lead them to us and we block whatever actions they are doing.

      We have been Invisible to Authorities for almost a decade now and if you google PYTHONAX, not really about us comes out, you can only see comments made by us or about us.

      Another Amazing thing to you benefit from Hiring our Hackers is that you get a Legit and the best Hacking service, As we provide you with Professional Hackers who have their Hacking Areas of specialization.
      We perform every Hack there is, using special Hacking tools we get from the dark web.

      Some list of Hacking Services we provide are-:
      ▪️Phone Hacking & Cloning ✅
      ▪️Computer Hacking ✅
      ▪️Emails & Social Media Account Hacking✅
      ▪️Recovering Deleted Files✅
      ▪️Tracking & Finding People ✅
      ▪️Hunting Down Scammers✅
      ▪️Hack detecting ✅
      ▪️Stealing/Copying Files & Documents From Restricted Networks and Servers ✅
      ▪️Credit Score Manipulation ✅
      ▪️ Deleting Criminal Records✅
      ▪️Bitcoin Multiplication✅
      ▪️Binary Option Money Recovery ✅
      ▪️Scam Money Recovery✅ And lots more......

      ✳️ SPECIAL HACKING SERVICES-: we also specialize in Scam Bounty, as we chase down SCAMMERS and help individuals RECOVER Money stolen from them by this online SCAMMERS. Please be watchful about this SCAMMERS. They post ❌ENTICING TESTIMONIES and it quite Convincing.

      Whatever Hacking service you require, just give us an Email to the Emails Address provided below.

      2020 © All Right Reserved.

  2. Extraordinary blog. I took pleasure in scrutinizing your articles. This is extremely a marvelous scrutinized for me. I have bookmarked it and I am suspecting examining new articles. Continue doing magnificent! auto approve blog comments sites

  3. The Techie Finds The Techie Finds is a general Technology blog. It provides Knowledge and Techy Articles and as well as Technology Stroy from different Countries.

    Latest Technology News & Trends Find all Tech News Learning magazines and read them anywhere. Get a subscription for you'r latest in science and technology news on thetechmagazines.com

    Health Life Buzz Get compassionate Health Life Buzz with experienced Healthy Living & Wellness. We have some of the best specialist doctors and also provide Healthy Living & Wellness Call today to book an appointment.

  4. You can arrive at the expert quality in this action in the event that you become engagedblog comment service

  5. I really appreciate this wonderful post that you have provided for us. I assure this would be beneficial for most of the people. Thanks for sharing the information keep updating, looking forward to more posts. High Quality Product Images

  6. Incredible tips and straightforward. This will be exceptionally helpful for me when I get an opportunity to begin my blog. ClassyPrice

  7. Great article with excellent idea!Thank you for such a valuable article. I really appreciate for this great information. Phone Price in Bangladesh

  8. Experience With My Roommates Girl friend
    Hi friends, I am Maxx not real name 24, with an athletic body type college sex video . I am a new reader of this site. I like many stories published in it. Today I want to share one of my sexual experiences which I enjoyed very much. It all started 4 months ago in Kolkata when I changed my job from Hyderabad to Kolkata. This is a very common thing in a BPO sector in the day of induction I met a cool guy Sunny, before long we became good friends.

  9. I am impressed by the information that you have on this blog. It shows how well you understand this subject.
    data analytics course
    data science course
    big data course

  10. I recently came across your article and have been reading along. I want to express my admiration of your writing skill and ability to make readers read from the beginning to the end. I would like to read newer posts and to share my thoughts with you.
    data science course in malaysia
    data science certification
    data science course malaysia
    data science malaysia
    data scientist course malaysia

  11. Easily, the article is actually the best topic on this registry related issue. I fit in with your conclusions and will eagerly look forward to your next updates.
    360DigiTMG PMP Certification
    PMP Certification in Malaysia
    PMP Course in Malaysia
    PMP Course

  12. I am impressed by the information that you have on this blog. It shows how well you understand this subject.
    data analytics course
    big data analytics malaysia
    big data course

  13. I would also motivate just about every person to save this web page for any favorite assistance to assist posted the appearance.
    data science course

  14. We read your blog , share most useful information in blog . Wordpress Update

  15. Wow, cool post. I'd like to write like this too - taking time and real hard work to make a great article... but I put things off too much and never seem to get started. Thanks though. https://sites.google.com/site/hotmailloginonline/

  16. They know to shop at Store X because that's where their coupons are issued from and they know that's where they can save money. Vipon

  17. I feel a lot more people need to read this, very good info!.Learn best Data Science Course in Hyderabad

  18. I’m excited to uncover this page. I need to to thank you for ones time for this particularly fantastic read!! I definitely really liked every part of it and i also have you saved to fav to look at new information in your site.Learn Best Data Science Training in Hyderabad

  19. Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing.Learn best Business Analytics Course in Hyderabad

  20. Great job for publishing such a beneficial web site. Your web log isn’t only useful but it is additionally really creative too. www.hotmail.com

  21. She has stepped up to show just how easy, and how much can be saved by any family using coupons and a multitude of other saving techniques. https://refermate.com/

  22. Fabulous post, you have denoted out some fantastic points, I likewise think this s a very wonderful website. I will visit again for more quality contents and also, recommend this site to all. Thanks. Vancouver SEO Agency


  23. Great to read article about berry update which i like reading about it.You have made an excellent effort in making this website which is appreciable. appvalley vip Sydney Brooke Simpson Dorian Rossini

  24. The purchasers had to skim through them and select the one she or he wanted.data entry ecommerce

  25. You can definitely see your enthusiasm in the work you write. The world hopes for even more passionate writers like you who aren’t afraid to say how they believe. Always follow your heart.url

  26. Thanks. Shared nice information.

    ETG is a Salesforce Commerce Cloud Implementation Partner. For 20 years, ETG Global Services, Inc. has successfully implemented eCommerce solutions for growth and enterprise clients.

  27. You're the best to share us about this redesign. Trust you won't get tired on making posts as enlightening as this. essay service

  28. Let's find answers to certain questions about the matter. You can buy medications from the comfort of your desktop. Finasteride which is used to treat diseases such as alopecia and similar diseases. What about medication without prescription? and alopecia? Where you can read more information about Can I buy erectile dysfunction medication online without prescription? Here are some basic points about Finasteride and buy erectile dysfunction medication?. Many perchance think the efficiency of Finasteride is well documented. Is it serious? Let's see. Furthermore Propecia may also be used to solve other conditions as determined by your doctor. Do not give Finasteride or any generic to anyone under 18 years old without medical advice.

  29. [10/9, 8:44 PM] RATNADWIP: IGNOU assignment front page
    [10/11, 3:51 AM] RATNADWIP: https://www.thewideinfo.com/glaze-all-franchise-list-in-india/
    [10/11, 5:13 PM] RATNADWIP: https://www.thewideinfo.com/girls-whatsapp-number-list/
    [10/15, 12:34 AM] Sayak 💀: https://www.thewideinfo.com/dse-haryana-seniority-list-of-masters/

  30. the end users know there is management buy in and expectation, and they are less likely to say or think "this is a waste of my time; I'm not doing this" Salesforce training in Chennai

  31. You can take the customer Survey and get a Free Coupon Code. website

  32. Nice information thank you,if you want more information please visit our linkAndroid Apk

  33. I never purchase games at second hand shops, I simply realize all the pieces won't be there.besimple.com/

  34. Nice Information Your first-class knowledge of this great job can become a suitable foundation for these people. I did some research on the subject and found that almost everyone will agree with your blog.
    Cyber Security Course in Bangalore

  35. Writing in style and getting good compliments on the article is hard enough, to be honest, but you did it so calmly and with such a great feeling and got the job done. This item is owned with style and I give it a nice compliment. Better!
    Cyber Security Training in Bangalore

  36. Thank you for your post, I look for such article along time, today i find it finally. this post give me lots of advise it is very useful for me !data science training in Hyderabad

  37. llo there mates, it is incredible composed piece completely characterized, proceed with the great work always. aol login

  38. I needed to leave a little remark to help you and wish you a decent continuation. Wishing you the good luck for all your blogging endeavors. Thunderstorm Sounds

  39. I needed to leave a little remark to help you and wish you a decent continuation. Wishing you the good luck for all your blogging endeavors. dark web market links

  40. Intriguing post. I Have Been pondering about this issue, so a debt of gratitude is in order for posting. Entirely cool post.It 's extremely exceptionally decent and Useful post.Thanks Scottish Fold kittens for sale

  41. Here at this site extremely the critical material accumulation so everyone can appreciate a great deal. MyLowesLife Login

  42. Super site! I am Loving it!! Will return again, Im taking your sustenance moreover, Thanks. 402 935 7733 paypal charge

  43. Thanks for the information about Blogspot very informative for everyone
    data science in malaysia

  44. Excellent article. Very interesting to read. I really love to read such a nice article. Thanks! keep rocking. should i use an essay writing service

  45. I was able to recover over $38,000 after I had lost $42,000 to bad investment in a fraudulent business offer online. All thanks to Arthur Vitali. If you need a good hacker, you found one. EMAIL- Quickarturhack@Gmail,com or WhatsApp +17025301177
    I just provided the transaction records and he traced all the accounts the money had passed through. He is currently working on my credit and has already gotten me 700 score, still moving to 800. I owe him this much.