Skip to content
LogoLogo

SSO dashboard tiles (Okta, Entra)

A tile on the company's Okta or Microsoft My Apps dashboard can open your app's sign-in. The tile never signs anyone in by itself. It opens a SaaSLayer URL that sends the browser to your app's sign-in page. The app then starts a normal SP-initiated sign-in through the connection, with a new state, PKCE verifier and nonce.

  • Off by default. A connection allows tiles only when its idpInitiated setting is true. The deployment owner or a tenant SSO admin can turn it on. A setup link cannot.
  • Cognito never accepts an unsolicited assertion. Cognito's own IdP-initiated SAML stays off on every connection (IDPInit: false). The tile URL ignores everything the identity provider sends: the posted SAML assertion, tokens, codes, RelayState, iss and target_link_uri.
  • No open redirect. The tile only lands on one of the deployment's approved callback URLs (AllowedCallbackUrls).

Status: Supported (preview). The Okta OIDC mechanism is tested: Okta's initiate-login URI started a fresh Cognito authorize request, with that URI pointed at Cognito directly rather than at the tile URL below. Sign-in through Okta OIDC, Okta SAML, Entra OIDC, Entra SAML and Google connections is tested end to end (see Provider setup), but the tiles were not part of those tests. The tile URL, the Okta SAML tile and both Entra tiles are not yet tested end to end. The names below are provisional until the naming gate.

The tile URL

https://<user-service host>/api/auth/sso/tiles/<connectionId>
https://<user-service host>/api/auth/sso/tiles/<connectionId>?redirect_uri=<an approved callback URL, exactly>

The tile URL accepts GET and POST. It answers 303 to the approved callback URL, adding ?sso_tile=<connectionId>. Without redirect_uri it uses the first approved URL. A redirect_uri that is not on the list exactly gets 400 SSO_TILE_REDIRECT_REFUSED, with no redirect.

On that page, <SignIn> (@saaslayer/react) does the following:

  1. It removes sso_tile from the address bar, so a reload or the Back button doesn't start sign-in again.
  2. It looks up the tile's route: GET /api/auth/sso/tiles/<connectionId>/route. This lookup is rate-limited per client.
  3. It shows Continue to your organization's sign-in. Nothing redirects until the user clicks.

If the connection doesn't allow tiles, or the lookup fails, the page shows the usual sign-in form with a notice.

For a custom sign-in page, use @saaslayer/js:

import { clearTileStart, readTileStart, resolveTileRoute, startSsoSignIn } from '@saaslayer/js'
 
const connectionId = readTileStart(location.href)
if (connectionId) {
  clearTileStart()
  const route = await resolveTileRoute({ userServiceApiBase, connectionId })
  // On the user's click:
  if (route.method === 'sso') await startSsoSignIn({ route, authServerUrl, appClientId, redirectUri, userServiceApiBase })
}

Okta

OIDC app (mechanism tested):

  • General → Login → Login initiated by: Either Okta or App.
  • Login flow: Redirect to app to initiate login (OIDC Compliant). Okta's simplified mode is refused for web apps.
  • Initiate login URI: the tile URL.

SAML 2.0 app (tile in preview; SAML sign-in tested end to end):

  • Keep the ACS URL at Cognito's https://<auth domain>/saml2/idpresponse.
  • Hide the SAML app's own tile (Do not display application icon to users).
  • Assign the same people a Bookmark app whose URL is the tile URL.
  • Leave Default RelayState empty. It is ignored anyway.

Microsoft Entra ID (tiles in preview; sign-in tested end to end)

Enterprise application (SAML):

  • In Basic SAML Configuration, set Sign on URL to the tile URL. My Apps then opens it instead of posting an assertion.
  • Reply URL (ACS): Cognito's https://<auth domain>/saml2/idpresponse.
  • Relay State: leave empty.

App registration (OIDC):

  • In Branding & properties, set Home page URL to the tile URL.