Skip to main content
Auth0 → SalesforceIntegration guide

Connecting Auth0 to Salesforce

Auth0 issues the user identity that everything downstream joins on, which makes it the system that decides whether an anonymous visitor and a paying customer can ever be connected. Sending conversions into Salesforce rather than out of it is how marketing data reaches the place sales actually works. The join between them succeeds or fails on one thing: whether the Lead or Contact identity reaches the Auth0 user identity before the conversion happens, because Salesforce can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Auth0 signups into Salesforce Leads with acquisition fields intact

Create a Salesforce Lead from a queue in your backend at Auth0 account creation, not synchronously in an Action, with first-touch source, campaign and click IDs. Upsert on an External ID field holding the Auth0 user_id, map click ID fields through Lead conversion, and treat Closed Won Opportunities as the conversion offline uploads read.

In a product-led B2B funnel, the Auth0 signup is the moment a Salesforce Lead should exist, and the useful payload is acquisition context: first-touch source, campaign and the click IDs captured before login. Create the Lead from your own backend when the account is created, not from a synchronous call inside an Auth0 Action, because a slow or failing Salesforce request there delays or blocks the login itself. Queue it.

Put the Auth0 user_id in an External ID field on Lead and Contact and upsert on it, so a retried webhook or a re-run sync updates one record instead of creating a duplicate. Salesforce matching rules will not catch the same person signing up with a password and with Google, because Auth0 issues two user_ids; link those in Auth0 first. Map the click ID fields through Lead conversion onto Contact and Opportunity, or they stay behind on the converted Lead.

The conversion ad platforms care about is the Opportunity reaching Closed Won weeks later. Salesforce becomes the place where the Auth0 identity, the click ID and the deal amount sit on one record, which is what an offline conversion upload reads. Do not log every login as an activity; it buries the timeline sales actually uses.

Auth0 → Salesforce · what breaks

Why this join usually fails — Auth0 → Salesforce

  1. 01

    The Lead or Contact identity never reaches Auth0

    Login flows redirect to a hosted Auth0 domain and back, which breaks the session and can lose an identifier captured before login.

  2. 02

    The login redirect losing the acquisition source

    The visitor arrives from an ad, clicks sign in, goes to Auth0's domain and comes back as a fresh session. Without deliberate persistence the campaign that produced them is gone at exactly the moment they became identifiable.

  3. 03

    Writes that succeed and change nothing

    Field-level security, validation rules and required-field constraints can reject a write while the API reports success. Open the record and look rather than trusting the response.

  4. 04

    Nothing reconciles afterwards

    Check the record in Salesforce itself, not the API response. Then confirm the value survives Lead conversion onto the Contact, Account and Opportunity — the mapping is separate and is usually the thing that was missed.

Auth0 → Salesforce · the fix

What working looks like — Auth0 → Salesforce

  • The Lead or Contact identity on every account

  • Conversions arriving in Salesforce

    The marketing context appears on the record and flows into the opportunity, where sales and reporting can both use it.

  • Reconciled against the source

Auth0 → Salesforce · architecture

How Auth0 and Salesforce actually connect

  1. 1

    Auth0 holds the truth

    Auth0 holds identity, not money. Its value to measurement is that it provides the stable key which lets a pre-signup session and a later subscription be recognised as one person.

  2. 2

    Salesforce needs a click to match

    Salesforce needs a resolvable record and a custom field to write to. Field-level security and validation rules can silently reject writes, which is a Salesforce-specific failure that returns success at the API level and changes nothing.

  3. 3

    The identifier is the bridge

    The Lead or Contact identity, captured at the visit and carried into the Auth0 user identity.

  4. 4

    The event source decides reliability

    Send paid conversions keyed on the user identity. Signups are a stage, not revenue.

  5. 5

    Deduplication at the destination

    Salesforce deduplicates according to whatever matching rules your org has configured, which vary enormously between instances. Duplicate Leads are the standard failure and merging them afterwards is manual work.

Auth0 → Salesforce · normal or broken

Working vs. broken, side by side — Auth0 → Salesforce

Normal, not a fault

  • The Lead or Contact identity present on the account

  • Sent from your billing system, keyed on the Auth0 user ID

  • Deduplicated correctly

    Salesforce deduplicates according to whatever matching rules your org has configured, which vary enormously between instances. Duplicate Leads are the standard failure and merging them afterwards is manual work.

  • Reconciles with the source

Actually broken

  • The Lead or Contact identity missing on most records

    Login flows redirect to a hosted Auth0 domain and back, which breaks the session and can lose an identifier captured before login.

  • Sent from the browser

    The visitor arrives from an ad, clicks sign in, goes to Auth0's domain and comes back as a fresh session. Without deliberate persistence the campaign that produced them is gone at exactly the moment they became identifiable.

  • Counted twice, or not at all

    Field-level security, validation rules and required-field constraints can reject a write while the API reports success. Open the record and look rather than trusting the response.

  • Nobody has reconciled it

Auth0 → Salesforce · diagnose

Diagnostic order — Auth0 → Salesforce

  1. 01

    Count accounts carrying the Lead or Contact identity

  2. 02

    Follow one real conversion end to end

  3. 03

    Check whether the identifier survives the login round trip

    Test it on a live login. This is the single most common identity break in products that use hosted authentication.

  4. 04

    Write a test value and open the record in the UI

    The API saying it worked and the field actually holding the value are different things in Salesforce more than anywhere else.

  5. 05

    Read the match rate, not the success message

    Check the record in Salesforce itself, not the API response. Then confirm the value survives Lead conversion onto the Contact, Account and Opportunity — the mapping is separate and is usually the thing that was missed.

Auth0 → Salesforce · prove

How it gets proven — Auth0 → Salesforce

Source of truth

Your billing system, joined to the Auth0 user ID.

  • The Lead or Contact identity confirmed present on a live account.
  • A test value confirmed present on the record in the UI, and confirmed to survive Lead conversion.
  • Paid conversions reconciled per user identity against imported conversions, with identifier survival verified across login.

Auth0 → Salesforce · free audit

What we check in the free audit

  • Count accounts carrying the Lead or Contact identity
  • Follow one real conversion end to end
  • Check whether the identifier survives the login round trip
  • Write a test value and open the record in the UI
  • Read the match rate, not the success message

Checked against

Your billing system, joined to the Auth0 user ID.

Get my free conversion tracking audit

Free30 minutesNo obligation

Auth0 → Salesforce · when not to buy

When you don't need this — Auth0 → Salesforce

  • Measure identifier coverage yourself first — pull your last hundred accounts and count how many carry the Lead or Contact identity.
  • If your product has no authentication, there is no identity to join and session-level attribution is all there is.
  • If your Salesforce org is administered by a team you cannot get time with, scope their availability before starting — this build is usually blocked on admin access rather than on the work.

Auth0 → Salesforce · what we deliver

What gets built — Auth0 → Salesforce

  • Identifier capture into Auth0

    Persist the identifier before the redirect and write it onto the user's app metadata at first login, so it survives every subsequent session.

  • Event source: your billing system, keyed on the Auth0 user ID

    Send paid conversions keyed on the user identity. Signups are a stage, not revenue.

  • Dispatch to Salesforce

    API writes to the Lead or Contact record, or a platform event, carrying the marketing context as custom field values.

  • Reversals where they exist

    Cancellations reverse against the same identity.

Written guarantee

95%+ tracking accuracy

Measured against Your billing system, joined to the Auth0 user ID.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Auth0 → Salesforce questions, answered

Usually Leads, upserted on an External ID holding the Auth0 user_id. Check for an existing Contact by email first if the company already sells to that account.

Free · 30 min

Get Auth0 and Salesforce joined properly

Free30 minutesNo obligation