Skip to content

Just in Time

Module 2 of 5 in the chapter Getting Users In and Out: Provisioning, chapter 12 of Securing Salesforce: Identity and Access. Each module stands on its own.

The question this module answers: How can Salesforce create her user at the moment she first logs in?

There’s a neat little term for user provisioning with the SAML assertion: JIT. What does JIT stand for? Just in time.

Remember the SAML assertion from chapter 6? Besides saying who she is, it can carry extra fields, called attributes. What extra information might the identity provider put in? Her first name, her last name, her title, her phone. Maybe what role she should have, what profile. If it sends enough, and she doesn’t exist in Salesforce yet, Salesforce can create a brand-new user for her, on the fly, and log her in.

That’s just-in-time provisioning. It creates and updates users “when users first log in to Salesforce with SAML single sign-on” (S1).

Here’s chapter 6’s single sign-on picture, in the same places. Look at steps 3 and 4.

Just in time Chapter 6's four lanes: Priya's browser, the identity provider, Salesforce's login server, and Salesforce's instance. Step 1: on her first day, with no Salesforce user yet, Priya opens a link to a record; the instance has no session and redirects her to the login server. Step 2: the login server works out which identity provider and redirects her there with a SAML request. Step 3: at the identity provider's login screen, Priya signs in, and the SAML response adds her details as attributes. Step 4: her browser posts the response, with her Federation ID and the attributes User.Email, User.LastName, User.ProfileId and User.Username, to the login server; no user has her Federation ID, so just-in-time provisioning creates her user from the attributes, and the login continues with a session. Step 5: she's redirected back to the record and is in, with her new user. Footnote: every later login, the same attributes update her user; nobody who never logs in gets one. {"author": "Steve Simpson", "blueprint": "1.0.0", "builder": "standard 1.58.0", "built": "2026-11-05", "id": "DGM-IAM-PRV-02", "rights": "\u00a9 2026 Twinshark LLC. All rights reserved.", "template": "cells 0.5.0", "theme": "stevetecharc 1.4.0"} PRIYA'S BROWSER THE IDENTITY PROVIDER SALESFORCE'S LOGIN SERVER SALESFORCE'S INSTANCE 1. Opens a link her first day: no Salesforce user yet No session yet redirects the browser to the login server 2. Goes to the login server redirected by the instance Which identity provider? the button, or the login URL 3. Goes to the identity provider redirected, with the SAML request The login screen Priya signs in; the response adds her details as attributes 4. Hands over the response her Federation ID, User.Email, User.LastName, User.ProfileId, User.Username No user has her Federation ID just in time: creates her user from the attributes 5. Back to the record redirected, with the session The record Priya is in, with her new user asks for the record redirect: go to the login server follows the redirect redirect to the IdP + SAML request SAML request response + attributes posts the SAML response redirect + session asks again, with the session the record Every later login, the same attributes update her user. Nobody who never logs in gets one. HOW TO READ IT the identity provider: the one login screen the user is created, then the login continues © 2026 Twinshark LLC · stevetecharc.com
Click to enlarge

Everything is chapter 6 until step 4. Then Salesforce looks for a user with her Federation ID and doesn’t find one. Without JIT, that’s where the login fails. With JIT, Salesforce creates her user from the attributes, and the login carries on as if she’d always been there.

The identity provider sends her details “in an Attributes statement in a SAML assertion”, and each User field takes the User. prefix: User.Username, User.Email (S2). Four fields are required (S2):

AttributeWhat it holds
User.EmailHer email address
User.LastNameHer last name
User.ProfileIdHer profile; “pass the ProfileName” if the ID differs between orgs, which it does
User.UsernameHer Salesforce username; used only when the user is created

And the subject of the assertion is her Federation ID: “JIT provisioning requires a Federation ID as the user type” (S1). That’s chapter 6’s matching value. It’s how Salesforce knows, next time, that this is the same Priya.

Many more are optional: her first name, title, phone, department, manager, employee number, her role, whether she’s active, and custom text fields (S2). Talk with whoever runs the identity provider about which ones it will send, and in exactly which format.

In Salesforce, it’s one section of the single sign-on setting you built in chapter 6 (S1):

  1. From Setup, Single Sign-On Settings, edit the SAML setting.
  2. Under Just-in-time User Provisioning, select User Provisioning Enabled.
  3. For User Provisioning Type, choose Standard: “Provisions users automatically using attributes in the SAML assertion.”
  4. For SAML Identity Type, choose Assertion contains the Federation ID from the User object.

You need Customize Application and Modify All Data. Standard JIT is available even in Professional Edition; the custom handler in module 3 isn’t (S1).

JIT doesn’t stop at creating her. Every time she logs in, the same attributes update her user. Change her phone number in the identity provider, and at her next login it’s updated in Salesforce too. That’s “JIT create, update”.

That’s a nice thing when you have a bunch of systems behind one identity provider. Change her details once, at the identity provider, and each system that uses JIT picks them up when she next arrives.

Here’s the catch, and it’s a big one. It only happens when she logs in.

  • Nobody who never logs in gets a user. If she must own records before her first login, make her another way (module 1).
  • Changes wait for her next login. If her data has to be right tonight, whether she logs in or not, you need a batch, or the identity provider pushing (module 4).
  • It never removes anyone. When she leaves, she stops logging in, so JIT never hears about it. Her user stays active until someone does something (module 4).
  • No permission sets. The standard fields include her profile and her role, but there’s no field for a permission set (S2). Module 3 handles that.

So JIT is a great way in. It isn’t, on its own, a way to keep users right, or a way out.

Test knowledge. In my experience, know that just-in-time provisioning creates or updates a user from the SAML assertion’s attributes at login, and that it needs the Federation ID.

In 2023 I made a video of just-in-time between two orgs: the phone attribute set at the identity provider, seen in the SAML tracer, and the user updated at login, with a custom handler. The note under the video says what’s still right and what’s changed since.

STA 3.7 · Salesforce SAML JIT for Automated User Data Updates · 9:11 · published 2023-09-27 · plays from YouTube when you click it · Watch on YouTube · More videos: Salesforce Identity & Access Videos

Module 3: when the standard rules aren’t enough. Create user, update user, everywhere.

  • Which groups get their users just in time, and which need users before they log in.
  • Which attributes the identity provider sends, in what format, and who owns that list.
  • Which profile and role each person gets, and from which attribute.
  • How leaving is handled, because JIT won’t.