Beta

Create a tenant

A new tenant starts with its own users, OAuth settings, audit history and logs. You are its first Tenant Admin.

How SAML sign-in works

Cedar Inc. signs its staff in once, and its outside services trust Cedar's word about who has signed in. SAML carries that word as a signed XML statement through the employee's browser, and each service turns it into a session of its own.

An application that does not know your password

Cedar Inc. buys an online training service for its staff. On her first morning with it, Avery clicks the link in her welcome email, and instead of a new sign-up form she sees Cedar Inc.'s familiar sign-in page. She signs in as she does every day, and a moment later she is looking at her assigned courses on training.example. The training company never asked for her password, and it does not have one.

That arrangement is what Cedar Inc. wanted. With hundreds of employees, a separate password at every outside service would mean hundreds of extra passwords to forget, reuse and reset, and a former employee would keep each of them until someone remembered to delete the account. Instead, Cedar Inc. keeps sign-in in one place and tells the training service who has signed in. Trust across systems introduced this idea as federation. SAML, the Security Assertion Markup Language, is one of the standards that carries it out, and it remains the most common way companies connect their staff to business applications.

The training service still has its own accounts, courses and permissions. What it gives up is checking credentials. It relies on Cedar Inc.'s statement that Avery has just signed in, and that statement has to be trustworthy enough to open her account.

Two parties and an agreement

SAML names the two sides by their jobs. Cedar Inc. is the identity provider, or IdP: it authenticates people and makes statements about them. The training service is the service provider, or SP: it receives those statements and decides what to do with them.

Before Avery's first sign-in, the two organizations exchange a few public facts. Each has an entity ID, a unique name for itself written as a URI. Cedar Inc.'s is https://login.cedar.example and the training service's is https://training.example/saml. An entity ID only has to be unique; it need not be a web page anyone can open.

The training service also names its assertion consumer service, or ACS, the address where it accepts sign-in results: https://training.example/saml/acs. Cedar Inc. names the address where it accepts sign-in requests, https://login.cedar.example/saml/sso, and publishes the certificate holding the public key it signs with. These facts usually travel as XML documents called metadata, which Metadata, certificates, and key rollover looks at closely.

The agreement is the foundation for everything that follows. When a message arrives, each side compares it with what it already knows about the other: who should be speaking, to whom, at which address and signed with which key. A message from a provider the training service has no agreement with is not trusted, however much it looks like SAML.

Following Avery through the browser

Here is the whole sign-in, step by step. Avery opens https://training.example/courses. The training service has no session for her browser, so it builds an authentication request, saves a note that this browser is waiting for an answer to it, and sends the browser to Cedar Inc. with the request attached. Stripped to its essentials, the request reads:

xml
<samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
    xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
    ID="_a7f3c2e91b0d" Version="2.0" IssueInstant="2026-10-12T08:59:58Z"
    Destination="https://login.cedar.example/saml/sso"
    AssertionConsumerServiceURL="https://training.example/saml/acs">
  <saml:Issuer>https://training.example/saml</saml:Issuer>
</samlp:AuthnRequest>

In plain words: "This is the training service. Please authenticate whoever is using this browser, and send the answer to my ACS." The ID lets the training service recognize the answer when it comes back.

Cedar Inc. receives the request, looks up the issuer in its own agreements, and confirms that the ACS address belongs to the training service. If the request asked for the answer to go anywhere else, Cedar Inc. would refuse before Avery even signed in, because a signed statement delivered to the wrong address could be used there. Avery signs in, or, if she already has a session with Cedar Inc. from earlier that morning, Cedar Inc. reuses it without asking again. That reuse is the "single" in single sign-on.

Cedar Inc. then builds a response containing an assertion, a statement signed with an XML signature, the kind XML and XML signatures for identity took apart, that says, in effect: "Cedar Inc. authenticated this person at 08:55; for the training service she is cedar-training-742; this statement is valid for five minutes and only at the training service's ACS." It cannot send the response to the training service directly, because the browser is the only party talking to both. So it gives the browser an HTML page with a form holding the response, and the page submits the form to the ACS by itself.

An SP-initiated sign-in. The browser carries the request to Cedar Inc. and the signed response to the training service; the two services never contact each other directly during the sign-in.

Both messages crossed the browser. That path is the front channel from How applications communicate, and it is why SAML assumes the browser and anything running in it can read, delay, copy or replay messages. The browser is a courier, not a source of authority, and every protection SAML relies on is inside the messages themselves.

A statement becomes a local session

When the form arrives at https://training.example/saml/acs, the training service validates it against the agreement and its saved note. Is it signed with Cedar Inc.'s key? Is it addressed to the training service, at this ACS? Is it inside its five minutes? Does it answer the request this browser started? Has this exact assertion been used before? Validating a response goes through the checks in order. Seeing Avery's name in the XML is not one of them.

Once the response passes, the training service finds the local account linked to cedar-training-742 and creates its own session for Avery, usually a cookie on training.example. From then on it recognizes her by that cookie. Cedar Inc.'s session cookie stays on login.cedar.example, and the training service never sees it. SAML handed over a sign-in result, not a shared session and not Avery's password.

Two sessions now exist, one at each service, and they live separate lives. Avery could sign out of the training service and still be signed in at Cedar Inc., so the next application she opens would not ask for her password at all.

What the sign-in does not decide

Authentication tells the training service who Avery is. It does not decide what she may do there. If the managers' leadership course is restricted, the training service checks its own permissions, perhaps using a department attribute Cedar Inc. agreed to send. A valid assertion opens Avery's account, not every course.

The sign-in also does not tie the two sessions together. When Avery's employment ends, disabling her at Cedar Inc. stops new sign-ins everywhere at once, which is one of federation's great advantages, but a session the training service already created lasts until it expires or is ended. Coordinated sign-out is a separate exchange, covered in Single logout.

The request and response in this lesson traveled as a redirect and an auto-submitted form. Those are two of SAML's bindings, the rules for carrying a SAML message over HTTP, and they decide how messages are encoded and how they are signed.

Check your understanding

Try these questions before moving on. If an answer isn't right, use the feedback and try again.

Avery already has a session at Cedar Inc. when she opens the training service. What does the training service receive from Cedar Inc. during the sign-in? 1 of 3

Choose one answer.

An AuthnRequest names the training service as issuer but asks for the response at an address the training service never registered. What should Cedar Inc. do? 2 of 3

Choose one answer.

Cedar Inc.'s assertion says Avery is a manager. She signs in to the training service for the first time. What may she do there? 3 of 3

Choose one answer.

Try it in the Lab

We value your privacy

We use cookies and similar technologies to enhance your browsing experience, and analytics to understand our traffic. By clicking "Allow all", you consent to optional analytics. Cookie Policy

Learn identity