Set up single sign-on with Okta
Single sign-on (SSO) lets the people in your organization sign in to Bricks with their Okta account instead of a Bricks password. You set it up yourself in Bricks, in six steps, and you can turn it off again at any time.
Who can do this: an administrator of your Bricks organization. You also need someone who can create applications in your company's Okta Admin Console (see Before you start).
How single sign-on works in Bricks
Single sign-on has four settings. You choose one in step 4, and step 6 turns on the last one.
- Off: everyone signs in with a password, as before.
- Testing: only the test link uses single sign-on. Use this while you set things up; nobody else is affected.
- Optional: people whose email address is on one of your verified domains are sent to Okta when they sign in. Passwords and emailed codes still work. The Bricks tile on your Okta dashboard also works from here on.
- Required: everyone in your organization must sign in through Okta. Only the bypass accounts you choose can still use a password.
Before you start
You'll need:
- Your Okta domain, for example acme.okta.com. It's the address your people sign in to Okta at. Don't use the admin console address (acme-admin.okta.com), and don't add a path such as /oauth2/default.
- The email domains your people sign in with, for example acme.com.
- Someone who can create app integrations in Okta (an Okta Super Administrator or Application Administrator) for step 1.
- An administrator of your Bricks organization who also signs in with Okta, for the test sign-in in step 3. Their Bricks account must use their company email address, on one of the email domains above.
- A primary email address in Okta for everyone who will use single sign-on, on one of your email domains. Bricks signs people in by that address. This is the most common reason a sign-in fails.
Set it up
In Bricks, go to Settings → Organization → Single sign-on. Under Which identity provider does your company use?, choose Okta. The page shows six steps and how many are done. Open a step to see its controls.
You can't change provider once you're connected. To switch provider later, contact Bricks.
Step 1: Create the Bricks app in Okta
Step 1 in Bricks shows two addresses to copy into Okta: the Sign-in redirect URI and the Initiate login URI. Use Copy next to each one.
In the Okta Admin Console:
- Go to Applications → Applications and select Create App Integration.
- Choose OIDC - OpenID Connect, then Web Application, and select Next.
- Name the app (for example Bricks).
- Under Grant type, leave Authorization Code selected.
- Under Sign-in redirect URIs, paste the Sign-in redirect URI from Bricks. Remove any sign-out redirect URI Okta fills in for you; Bricks doesn't use one.
- Under Assignments, choose who can use Bricks: everyone in your organization, or selected groups. Only people assigned to the app can sign in. If Okta offers Enable immediate access with Federation Broker Mode, untick it (see the note below).
- Select Save.
Then, on the app's General tab, under Login, select Edit and set:
- Login initiated by: Either Okta or App
- Application visibility: Display application icon to users
- Login flow: Redirect to app to initiate login (OIDC Compliant)
- Initiate login URI: paste the Initiate login URI from Bricks
Select Save.
If your app shows Federation Broker Mode as enabled, turn it off (General tab → Federation Broker Mode → Disable) and assign the app to your people. With Federation Broker Mode on, people can still sign in, but Okta never shows the Bricks tile on their dashboard.
Finally, on the General tab under Client Credentials, keep Client authentication set to Client secret, and copy the Client ID and the Client secret. You'll paste them into Bricks in step 2.
Step 2: Connect Okta
- Enter your Okta domain (for example acme.okta.com).
- Paste the Client ID and Client secret from Okta.
- Enter your Email domains, separated by commas (for example acme.com, acme.co.uk).
- Select Connect.
Bricks checks the domain and the credentials with Okta before saving. If Okta rejects them, you'll see Okta rejected the client ID or client secret: copy both again from the app's Client Credentials and retry. Bricks stores the secret securely and never shows it again.
Each email domain starts as Pending. Okta sign-in only works for a verified domain. To verify one:
- By DNS: select Verify with DNS, add the TXT record Bricks shows you at your DNS provider (name _bricks-sso.<your domain>), then select Check DNS. DNS changes can take a while to appear; if the record isn't found, try again later.
- By Bricks: if you can't add a DNS record, contact Bricks. Once Bricks has confirmed the domain and your Okta domain belong to your company, the domain shows Verified by Bricks.
A domain already verified by another Bricks organization can't be claimed, and an Okta domain can only be connected to one Bricks organization.
Step 3: Sign in through the test link
If single sign-on is Off, select Start testing first. The test link only works in Testing or later.
The Test link appears once your own email domain is verified. Then an administrator of your Bricks organization opens the test link and signs in with Okta, using their company email address. That sign-in proves the connection works and belongs to you. Until it happens, you can't move past Testing.
Use Copy to send the link to your administrator if it isn't you.
Step 4: Choose who signs in with single sign-on
Choose Off, Testing or Optional (see How single sign-on works above). Stepping down or turning it off takes effect within a minute.
Account creation: turn on Create an account on first single sign-on sign-in if you want people at your domains to get a Bricks account the first time they sign in with Okta. New accounts get your organization's default role, shown under the switch. If your organization requires administrator approval for new users, new accounts wait for your approval before they can use Bricks.
With account creation off, only people who already have a Bricks account in your organization can sign in through single sign-on.
Step 5: Add a bypass account
Bypass accounts can still sign in with a password when single sign-on is required. They're how you get back in if Okta sign-in ever stops working.
- Select Add me, or choose someone under Add someone. Only people in your organization can be bypass accounts.
- Save the Break-glass sign-in link (use Copy). If single sign-on stops working, a bypass account signs in there with a password and steps single sign-on back down.
At least one bypass account must be an active administrator of your organization, since only an administrator can turn single sign-on back off. Other bypass accounts are marked Doesn't count.
Step 6: Make single sign-on required (optional)
When you're ready, select Make it required, then confirm. If something is still missing, the step is locked and lists what's needed, for example a verified domain, a bypass account, or the administrator's test sign-in from step 3.
Once single sign-on is required, everyone in your organization signs in through Okta, and only bypass accounts can use a password (through the break-glass link). To undo it, select Step back to Optional.
Signing in from the Okta dashboard
Once single sign-on is Optional or Required, people can open Bricks from the Bricks tile on their Okta dashboard. The tile appears for everyone assigned to the app, as long as Federation Broker Mode is off (see step 1).
People can also start from the Bricks sign-in page: they enter their email address, and Bricks sends them to Okta.
Rotate the client secret
Okta client secrets don't expire, so you don't need to replace yours on a schedule. To replace it (for example if it may have been exposed):
- In Okta, open the app's General tab and, under Client Credentials, select Generate new secret. Copy it.
- In Bricks, open step 2, paste it into Client secret, and select Save changes. Bricks checks it with Okta before saving.
- Back in Okta, deactivate and delete the old secret.
Sign-ins keep working throughout, because the old secret stays active in Okta until you deactivate it.
You can replace the client ID and secret at any setting. The Okta domain can only be changed at Testing or Off, and changing it resets the connection: domains must be verified again, an administrator must repeat the test sign-in, and people link again on their next sign-in.
What happens the first time someone signs in
- They already have a Bricks account with the same email address in your organization: single sign-on connects to that account.
- They don't, and account creation is on: Bricks creates their account in your organization with the default role. If your organization requires approval for new users, they see that their account is waiting for approval.
- They don't, and account creation is off: they can't sign in. Invite them in Bricks first.
Troubleshooting
"Your account isn't set up for single sign-on. Contact your administrator." after signing in with Okta:
- Check the person's primary email in Okta is on one of your verified email domains. This is the most common cause.
- Check they have a Bricks account in your organization, or that account creation is on.
- Check the email domain is listed and verified in step 2.
The Bricks tile doesn't appear on the Okta dashboard: check the person is assigned to the app, that Application visibility is set to show the icon, and that Federation Broker Mode is off (step 1). The tile only signs people in once single sign-on is Optional or Required.
"Okta rejected the client ID or client secret": copy both again from the app's Client Credentials in Okta, and check the secret is still active there.
"Bricks couldn't reach that Okta domain": check the spelling of your Okta domain (for example acme.okta.com, without -admin and without a path).
"That Okta domain is already connected to another organization": contact Bricks.
"Single sign-on isn't available for this link": the link is for a connection that's turned off, or doesn't exist. Use the sign-in page instead.
Locked out after making single sign-on required: a bypass account signs in through the break-glass link with a password and steps single sign-on down to Optional or Off.
Still stuck? Contact Bricks support through the chat on this site.