Skip to content

lekkimworld.com

Blog by Mikkel Flindt Heisterberg about everything and nothing – mostly appdev stuff…

Recent Posts

  • Salesforce CLI TypeError with node v. 25.1.0
  • Amount of data required for testing Agentforce
  • Salesforce External Client App key and secret rotation via REST API
  • Only allow Bulk API for specific API users
  • Winter 26 Release Walk-thru

Recent Comments

  1. Winter '26 Release Notes - Blog Martina Humpolce on Salesforce External Client App key and secret rotation via REST API
  2. Parth Savjadiya on Loving streams in node.js
  3. swamigalkodi on BYOLLM using Salesforce Einstein Open Connector API
  4. Lee Hildebrand on Scratch org with Salesforce Event Monitoring
  5. SMT on Minimum access to create/delete Salesforce scratch orgs

Archives

  • November 2025
  • October 2025
  • September 2025
  • May 2025
  • April 2025
  • March 2025
  • January 2025
  • February 2024
  • March 2023
  • January 2023
  • December 2022
  • June 2022
  • May 2022
  • October 2021
  • August 2021
  • June 2021
  • May 2021
  • March 2021
  • February 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • August 2019
  • July 2019
  • June 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • May 2018
  • April 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • September 2017
  • August 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • March 2016
  • February 2016
  • January 2016
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • April 2015
  • March 2015
  • February 2015
  • January 2015
  • November 2014
  • October 2014
  • August 2014
  • June 2014
  • May 2014
  • March 2014
  • February 2014
  • December 2013
  • November 2013
  • October 2013
  • September 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • August 2012
  • July 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • July 2007
  • June 2007
  • May 2007
  • April 2007
  • March 2007
  • February 2007
  • January 2007
  • December 2006
  • November 2006
  • October 2006
  • September 2006
  • August 2006
  • July 2006
  • June 2006
  • May 2006
  • April 2006
  • March 2006
  • February 2006
  • January 2006
  • December 2005
  • November 2005
  • October 2005
  • September 2005
  • August 2005
  • July 2005
  • April 2005
  • March 2005
  • February 2005
  • January 2005
  • December 2004
  • November 2004

Categories

  • Uncategorized

Tag: security_token

Salesforce for Newcomers – Introduction to orgs, sandboxes, API login and Salesforce security

As I venture into the Salesforce Universe myself there are many areas that I would have wished had been easier to figure out. So what better than remedying that with a series of blog posts. Maybe there will be one post and maybe more. We’ll see… This first instalment is on some of the basics in Salesforce namely the org, sandboxes and some of the security implications of logging in. I’m pretty technical so some of this will be from a technical angle so please forgive me and stay with me.

“Org”

When you get provisioned a Salesforce instance – or an org as we like to call them – you get your own slice of the Salesforce infrastructure. Depending on the amount of data you add to the org the slice may be VERY small or VERY big but the core concept is the same. Every org has an identifier (the “org id”) and that is what identifies it and the associated data throughout the Salesforce infrastructure. Everything you do in your org – data and customizations belongs to your org due to being coupled to your org id.

Boom! That’s it.

Sandboxes

A sandbox is something you may or may not get depending on the license types you buy and depending on the type of licenses you may even get more than one. Sandboxes are play areas that are connected to your org and allows you to develop and test customizations and – maybe – eventually move these customizations to your production org. Sandboxes come in different flavours and may contain no actual production data, some data or all of your production data. We call these empty, partial and full sandboxes. A sandbox always contains the customizations from the org it was generated from.

Besides the customizations a sandbox also gets a copy of all the users from the “source org” although the email addresses of users are changed in the process by removing the @-sign and appending @example.com. Bringing all the users across means that users may log into the sandbox using their existing username and password – the only change they need to do is to append a period and the name of the sandbox. So if my username is jdoe@acme.com and I’m logging into a sandbox called “uat” I simply use the username jdoe@acme.com.uat and my password.

Customizations may be moved between a sandbox and an org using a “change set” which basically is our way to move customizations between environments. There are other ways as well for more advanced uses but let us keep it simple for now.

Logging in

At Salesforce our number one value is trust. The trust of our customers and the trust they place in us to keep the data they entrust with us safe. This means we spend a considerable amount of time and resources keeping data secure and ensuring that no two orgs get mixed up. It also means that Salesforce offers a number of ways to make sure only the right people may log in and do that at the right time of the day.

These security features come in a number of flavors including but not limited to:

  • Username and password (duh!) and being able to set the complexity required of passwords.
  • Whether two factor authentication is required using either the Salesforce Authenticator app, login codes texted to your cell phone or emailed to you.
  • Which users may log in from what IP ranges and at what time of the day. If a user is assigned to a call center chances are they should only login from the call center location between 9am and 6pm.
  • What IP ranges are deemed trusted. A login from a trusted IP range is special in that it doesn’t require a second factor of authentication (that is besides username and password).

Besides these there are loads of other security mechanisms – way too many to dive into here in detail. If interested head over to Help & Training or get friendly with the security related pages under Setup in an org.

Security and the API’s

Authenticating to the various API’s for Salesforce is slightly different from logging in to the web UI or Salesforce1 (our mobile app). As a developer, you need to know the type of org (production or sandbox) you’re working against If you need to authenticate using the API’s. The main reason is due to any login IP restrictions you may have configured for your production org but really it’s not important to know why. Simply remember that when using API’s and you need to log into a production org you use login.salesforce.com and If logging in against a sandbox you use test.salesforce.com.

It’s that simple. Use test.salesforce.com for – well – testing. So if using OAuth and logging in to a production org you use https://login.salesforce.com/services/oauth/token and If logging in against a sandbox use https://test.salesforce.com/services/oauth/token.

And really that’s all there is to it.

Security Tokens

This is the final piece for this post but an important one. Remember those IP ranges that may have been set up as trusted in your org? If not go back and find that section and read it again… Salesforce uses the security token as a second factor of authentication if you are attempting to login from a source that Salesforce doesn’t not quite trust. For interactive logins the second factor is either a code from Salesforce Authenticator or similar but for API logins the second factor is your “Security Token”.

Think of the security token as:

  1. An extra password that Salesforce issues to you (you cannot set it manually)
  2. That gets reset whenever you change your password
  3. Which is only ever revealed to you once. If you lose it, you may reset it from your personal Settings at which point the new one gets revealed to you.

Using the security token is very easy – you just append it to your actual password and use the resulting string as you normally would the password. As a super password if you will.

If you are lucky enough to be a developer and log into Salesforce using the API’s the security token is important to you as you may need to use your password/security token combo instead of your actual password. Again only if logging in from an untrusted network range such as when working from home without VPN or from Stackbucks.

For more information from the authoritative source of all things Salesforce I recommend reading through the posted titled Security and the API.

Posted on February 10, 2017Tags login, salesforce, security, security_token, securitytoken
Proudly powered by WordPress