Last reviewed on September 28, 2026 by the Government.biz editorial team against SAM.gov and GSA guidance, FAR 52.204-16, and DLA CAGE program information.

The short answer

Every company that does business with the federal government ends up with two identifiers, and forms, primes, and portals ask for them interchangeably, which causes confusion:

UEI — Unique Entity ID

A 12-character alphanumeric identifier issued by SAM.gov (run by GSA). It identifies your legal entity across federal award systems — contracts, grants, subaward reporting, FPDS, and CPARS.

  • Issued by SAM.gov, free
  • Replaced the DUNS number on April 4, 2022
  • Does not expire
  • Can be obtained with or without full registration

CAGE code

A 5-character Commercial and Government Entity code assigned by the Defense Logistics Agency (DLA) CAGE Branch. It identifies a specific entity at a specific location address, and is used heavily in DoD logistics, payment, and security systems.

  • Assigned by DLA, free
  • For U.S. entities, assigned automatically during SAM registration
  • Tied to a name and physical address
  • Foreign entities use an NCAGE code instead

In practice: the UEI answers "which legal entity is this?" and the CAGE code answers "which entity, at which facility?" You need both to hold an active SAM registration for contracts. Neither costs anything, and no third party can issue either one.

UEI vs CAGE code side by side

UEICAGE code
Issued bySAM.gov (GSA's Integrated Award Environment)DLA Commercial and Government Entity Branch
Format12 characters, letters and numbers5 characters, letters and numbers
IdentifiesThe legal entityThe entity at a specific location address
How you get itRequest in SAM.gov; assigned after entity validationAssigned during SAM registration (U.S.), or requested directly at cage.dla.mil if you are not registering in SAM
Foreign entitiesObtain through SAM.gov like U.S. entitiesMust obtain an NCAGE code before registering in SAM
Expires?No — but the SAM registration must be renewed every 365 daysRecords must be kept current; an active SAM registration does this for you
Where you'll see it asked forProposals, grants, subaward reporting, FPDS, CPARS, prime vendor onboardingProposals (FAR 52.204-16), PIEE/WAWF, DIBBS, security clearance paperwork, ownership reps (FAR 52.204-17)

What happened to the DUNS number

Until 2022, the government identified entities with the nine-digit DUNS number, which was issued by Dun & Bradstreet. On April 4, 2022, SAM.gov and the other GSA award systems (including FPDS, eSRS, FSRS, and CPARS) switched to the Unique Entity ID (SAM) as the authoritative identifier. Registered entities had been assigned their UEI in advance, so existing registrants did not need to reapply.

What this means today:

How to get a UEI

There are two routes in SAM.gov, both free:

  1. Get a UEI only. Choose this if you only need to be identified — for example, as a subcontractor that a prime must report, or a subrecipient of a grant. SAM validates your legal business name and physical address and issues the UEI. You are not registered to receive a prime federal award.
  2. Register the entity. Choose this if you want to bid on and receive federal contracts or grants directly. You request the UEI as the first step, then complete core data, assertions, representations and certifications, and points of contact. Our SAM.gov registration guide walks through each step.

Either way, the UEI is assigned only after entity validation — SAM's check that your legal name and physical address match an authoritative source. If validation fails, SAM will ask you to submit documents (for example, articles of incorporation or a state registration showing the exact legal name and address) through a ticket with the Federal Service Desk at FSD.gov.

Match everything exactly. The most common cause of validation delays is a mismatch — "Inc." vs "Incorporated," a suite number, a DBA used instead of the legal name, or a mailing address entered as the physical address. Use the name and address exactly as they appear on your state formation documents and IRS records.

How to get a CAGE code

U.S. entities

If you are located in the United States or its outlying areas and complete a full SAM registration, you do not apply separately: under FAR 52.204-16, the DLA CAGE Branch assigns a CAGE code as part of the SAM process, after the IRS validates your taxpayer information. If DLA already has a CAGE code for your entity at that address, SAM will associate it rather than create a new one.

If you need a CAGE code but are not registering in SAM — for example, a subcontractor that needs one for a facility security clearance or a prime's onboarding — you can request one directly at cage.dla.mil.

Foreign entities: NCAGE first

Entities located outside the United States must obtain a NATO CAGE (NCAGE) code before registering in SAM. The NCAGE comes from the codification bureau in the entity's country if that country is a NATO member or sponsored nation; otherwise it is requested through the NATO Support and Procurement Agency (NSPA). Make sure the name and address on the NCAGE record match what you enter in SAM exactly — mismatches are the most common reason foreign registrations stall.

How long it takes

There is no paid expedite. Anyone offering to "speed up" your UEI or CAGE code for a fee is selling assistance with a free government process.

When you need each one

SituationWhat you need
Bidding on and receiving a federal prime contractActive SAM registration, which gives you both a UEI and a CAGE code
Receiving a federal grant or cooperative agreementActive SAM registration (UEI; U.S. registrants are typically also assigned a CAGE code)
Being reported as a first-tier subcontractor or subrecipientA UEI (full registration not required unless your prime or agency asks)
Selling through DLA's DIBBS, or invoicing in PIEE/WAWFA CAGE code tied to your active registration
Facility security clearance sponsorshipA CAGE code
Micro-purchases on a government purchase cardOften neither is strictly required, but many buyers prefer vendors they can look up in SAM
Foreign company bidding on U.S. federal workNCAGE code first, then SAM registration and UEI

On offers, FAR 52.204-16 requires your CAGE code with your name and location address, and FAR 52.204-17 asks for the CAGE code of your immediate and highest-level owners, if any. Prime contractors also commonly request both codes during teaming and subcontract onboarding so they can check your registration, size status, and exclusions directly.

Updating your UEI and CAGE after an address or ownership change

Address changes

Update your physical address in SAM.gov, not by emailing DLA. Because both identifiers depend on a validated name and location, changing the physical address can trigger entity validation again and an update to your CAGE record, so expect the registration update to take some time. Do it before you move, if possible, and keep proof of the new address ready. Payments go by EFT to the bank account in SAM, so update banking changes at the same time — see getting paid on federal contracts.

Legal name changes

A change of legal name (without a change of entity) keeps the same UEI, but SAM will revalidate the new name. Existing contracts need a change-of-name agreement under FAR Subpart 42.12, processed as a contract modification.

Ownership changes, mergers, and acquisitions

Common problems and how to fix them

Frequently asked questions

What is the difference between a UEI and a CAGE code?

The UEI (Unique Entity ID) is a 12-character identifier issued by SAM.gov that identifies your legal entity across federal award systems. The CAGE code is a 5-character code assigned by the Defense Logistics Agency that identifies your entity at a specific location address. Contractors registered in SAM.gov have both.

How do I get a CAGE code?

U.S. entities get a CAGE code automatically as part of SAM.gov registration; the DLA CAGE Branch assigns it after IRS validation. If you are not registering in SAM, you can request one directly at cage.dla.mil. Foreign entities must obtain an NCAGE code from their national codification bureau or NSPA before registering in SAM. It is free.

Is the UEI the same as the DUNS number?

No. The UEI replaced the DUNS number as the federal government's entity identifier on April 4, 2022. The UEI is issued by SAM.gov rather than Dun & Bradstreet, and you do not need a DUNS number to register or bid on federal work.

Can I get a UEI without registering in SAM.gov?

Yes. SAM.gov lets you obtain a UEI only, which is enough to be identified as a subcontractor or subrecipient. To bid on and receive federal prime contracts or grants directly, you must complete a full entity registration and keep it active.

How long does it take to get a UEI and CAGE code?

A UEI can be issued quickly if your legal name and address match the validation source, but can take longer if SAM asks for documents. The CAGE code is assigned after you submit your SAM registration and typically takes several business days. Plan for at least a couple of weeks for a full registration to become Active.

Does my UEI or CAGE code expire?

The UEI does not expire, but your SAM.gov registration must be renewed every 365 days to stay active. The CAGE record must be kept current; for SAM registrants, maintaining an active registration keeps it updated.

Do I need a new CAGE code or UEI if I move or sell the company?

Update a new physical address in SAM.gov, which may trigger revalidation and an update to the CAGE record. A stock sale usually keeps the same UEI and CAGE because the legal entity is unchanged, while an asset sale to a different entity uses that entity's UEI and requires a novation of existing contracts.

Related pages

Authoritative sources: SAM.gov, Federal Service Desk, DLA CAGE, and FAR 52.204-16. This page is general information, not legal advice.