Field guide Getting Started

PrimeWright · Government Contracting Pipeline · Est. 2026

UEI vs. CAGE Code: What's the Difference and Do You Need Both?

You register once on SAM.gov and walk away with two different codes: a UEI and a CAGE code. Nobody explains why you need both, so most first-time registrants assume they're duplicates. They're not. One identifies your business as a legal entity. The other started as a supply-chain tracking code for the Department of Defense. You need both, but not for the same reason.

What a UEI actually is

The Unique Entity Identifier is your business's ID inside SAM.gov and every other federal award and financial system. It replaced the old nine-digit DUNS number in April 2022, when SAM.gov and GSA's other systems switched over to it as the authoritative identifier. It's a 12-character alphanumeric code, generated automatically the moment you start a SAM.gov registration. You don't request it from a third party and you don't pay for it. If a site tries to sell you a UEI, walk away.

Uniqueness here means one legal entity at one physical address gets one UEI. Open a second location as a separate legal entity and you get a second UEI. This is the code that shows up on every award, every grant record, every past-performance reference tied to your business going forward.

What a CAGE code actually is

A CAGE (Commercial and Government Entity) code is a five-character identifier assigned by the Defense Logistics Agency, and it predates the UEI by decades. DLA built it to track suppliers and parts in the defense supply chain, long before SAM.gov existed as a single portal. The system stuck around because it still does that job: identifying a specific commercial entity for procurement and logistics purposes, mostly but not only for defense-related work.

Here's the part that actually matters for you: you don't apply for a CAGE code separately. When you register on SAM.gov, the system automatically kicks off a CAGE code request to DLA as part of that same registration. You get an email once it's assigned, and it shows up in your SAM profile alongside your UEI. Same registration, two different codes, two different systems behind them.

So why do you need both

Because they answer two different questions. The UEI answers "which legal entity is this," across every federal award and finance system. The CAGE code answers "which supplier is this," a question DLA and other procurement systems still ask specifically. Some solicitations, forms, and supply-chain documents still reference CAGE codes directly because that's the identifier those systems were built around. You can't opt out of getting one, and you don't need to try. It arrives free, automatically, as part of a normal SAM.gov registration.

The one place this trips people up is renewal. UEIs don't expire on their own; your annual SAM.gov renewal keeps your whole registration active, UEI included. CAGE codes issued after August 2016 need renewal roughly every five years, but a normal annual SAM.gov renewal resets that clock too. You're not managing two separate expiration dates in practice. You're managing one SAM.gov registration that carries both.

We are not SAM.gov, are not affiliated with the U.S. government, and are not a registrar. SAM.gov registration is always free at sam.gov. We provide preparation assistance only.

What to actually check

If you're mid-registration or reviewing an existing one, confirm both codes are present in your SAM.gov entity record and that your CAGE code is current, not just issued once and forgotten. A lapsed CAGE code alongside an active SAM registration is a real, if less common, way to get flagged during a compliance review. If you want the full registration order, from EIN through reps and certs, we walk through it step by step in our SAM.gov registration guide, and if you're setting up your pipeline before your registration even clears, our readiness check tracks what's still missing.

If your CAGE code is the piece still missing, here's how it actually gets assigned and why some sites charge for something SAM.gov gives you free. And your UEI shows up in one more place worth knowing about: what a UEI number actually is and where it's used beyond just SAM.gov registration.

Related reading

Sources

Get to submission-ready, free.