UEI and CAGE Codes Explained for Contractors

What a Unique Entity ID and a CAGE code are, how you get them in SAM.gov for free, how the UEI replaced the DUNS number, and where you'll use each.

A Unique Entity ID (UEI) is the 12-character ID that SAM.gov assigns to your company, and since April 4, 2022 it has replaced the DUNS number as the federal government’s official company identifier. A CAGE code is a separate five-character ID, assigned by the Defense Logistics Agency, that identifies your company at a specific location. You get both free through SAM.gov.

These two codes show up on almost every federal form, proposal cover page and prime contractor vendor packet. Here’s what each one is, how to get it, and where it matters.

Key takeaways

  • The UEI is a 12-character alphanumeric ID assigned by SAM.gov when your entity passes validation.
  • The UEI replaced the DUNS number on April 4, 2022, according to GSA.
  • A CAGE code is a five-character ID assigned by the Defense Logistics Agency. U.S. companies get one through SAM.gov registration.
  • Both are free. Nobody needs to be paid to issue them.
  • A UEI on its own does not let you bid as the prime. You need a full SAM.gov registration for that.

What is a Unique Entity ID?

The SBA describes the UEI as a unique 12-character alphanumeric value that you receive when you register at SAM.gov. Entities doing business with the federal government must use the UEI the system creates.

The UEI is assigned when your organization passes entity validation, the step where SAM.gov confirms your entity exists, where it’s located, and that it isn’t already registered. An energy.gov guide built from SAM.gov material describes validation as confirming an entity’s existence, location and uniqueness, where uniqueness means a separate legal entity with a separate physical address.

Why did the UEI replace the DUNS number?

Before April 2022, federal systems identified companies by a nine-digit DUNS number issued by a private company, Dun & Bradstreet. GSA’s transition fact sheet set April 4, 2022 as the date the federal government moved to the SAM.gov-generated UEI.

SBA notes that businesses no longer have to go to a third-party website to get their identifier, which streamlines entity validation. If an old form or a vendor portal still asks for a DUNS number for federal work, the current answer is your UEI.

How do I get a UEI?

There are two ways, both at SAM.gov:

  1. Register your entity. You’re assigned a UEI during registration. This is the right choice if you want to bid on federal contracts. See the step-by-step SAM.gov registration guide.
  2. Request a UEI only. SAM.gov says this needs just your legal business name and physical address. It’s meant for organizations that only do things like reporting as a subawardee. With a UEI only, you can’t apply directly for federal awards.

If your company is already registered, you already have a UEI. It’s shown in your SAM.gov Entity Workspace.

What is a CAGE code?

A Commercial and Government Entity (CAGE) code is a five-character identifier that the Defense Logistics Agency assigns to identify an entity at a specific physical location.

The SAM.gov checklist explains how U.S. companies get one: if you don’t have a CAGE code, select “No” during registration and one is assigned to your entity after you submit. Companies based outside the U.S. instead need an NCAGE code before starting a SAM.gov registration.

CAGE validation is one of the two checks, along with the IRS check of your taxpayer ID, that can hold up a new registration. If it fails, you’ll get an email explaining what to fix.

How are the UEI and CAGE code different?

Unique Entity ID (UEI) CAGE code
Length 12 characters 5 characters
Issued by SAM.gov (GSA) Defense Logistics Agency
When you get it When your entity passes validation After you submit a SAM.gov registration (U.S. entities)
Identifies Your organization Your organization at a specific location
Cost Free Free

Practically, you’ll list both on your capability statement, on proposal cover pages, and in vendor forms from primes.

Where will I use my UEI and CAGE code?

  • Proposals and quotes. The standard FAR provision at 52.204-7 tells offerors to enter their Unique Entity Identifier with their name and address on the offer’s cover page.
  • Capability statements. Buyers and primes expect to see both near the top. See how to write a capability statement.
  • Subcontracting paperwork. Primes have to report first-tier subcontracts above a dollar threshold (raised to $40,000 on October 1, 2025, per Acquisition.gov), so they’ll ask for your UEI.
  • SBA certifications. Applications for programs like HUBZone, WOSB and VetCert tie to your SAM.gov record. See set-aside programs explained.
  • Searching award history. UEIs make it easy to look up any company’s federal awards on USAspending.gov, including competitors and potential primes.

Do UEIs and CAGE codes expire?

The identifiers stay with your entity. What expires is your registration, which SAM.gov requires you to renew every 365 days. A company with a UEI but a lapsed registration isn’t eligible for new awards until it renews. Keeping your record current also keeps your CAGE information and points of contact accurate.

If your company changes its legal name, address or ownership, update SAM.gov. Changes to physical location can affect your CAGE record because the CAGE code is tied to a location.

Common mistakes to avoid

  • Paying for a UEI. It’s free. Any fee is for a service, not the identifier.
  • Mismatched data. Validation compares your name and address to official records. Use exactly what the IRS has.
  • Assuming a UEI means you’re registered. A UEI-only record can’t bid as the prime.
  • Forgetting renewal. The UEI stays, but the registration lapses after 365 days.

Where Bidstream fits

Bidstream keeps track of the details that make a company bid-ready, including SAM.gov status and renewal timing, alongside the opportunities that fit your trade. If you’re still getting set up, choose “Help me get ready” when you sign up and Bidstream will walk you through what’s missing.

Frequently asked questions

What is a Unique Entity ID (UEI)?

The UEI is a 12-character alphanumeric identifier that SAM.gov assigns to an organization when it passes entity validation. It is the federal government's official identifier for companies it does business with.

Did the UEI replace the DUNS number?

Yes. On April 4, 2022, the federal government stopped using the DUNS number and switched to the SAM.gov-assigned Unique Entity ID. You no longer go to a third-party website to get an identifier.

How much does a UEI cost?

Nothing. SAM.gov says there is no charge to get a Unique Entity ID, register your entity, or maintain your registration.

What is a CAGE code and how do I get one?

A Commercial and Government Entity (CAGE) code is a five-character identifier assigned by the Defense Logistics Agency to an entity at a specific location. U.S. companies that don't have one answer 'No' to the CAGE question during SAM.gov registration, and one is assigned after they submit.

Can I bid on federal contracts with just a UEI?

No. SAM.gov says that if you only get a Unique Entity ID, you cannot apply directly for federal awards. To bid as the prime you need a full registration.