> Source: https://builder.ema.ai/v2/getting-started/first-login
> Title: First Login

# First Login

Ema uses an email-first sign-in. You always start by entering your email address; Ema then routes you to the method your administrator configured for your workspace: single sign-on (SSO), a one-time passcode (OTP) sent to your email, or a password. Some workspaces also require a second factor (two-factor authentication, or 2FA) after the first step.

> [INFO]
> **Your administrator decides the method.** You don't pick how you sign in; your workspace's configuration does. Just enter your email and Ema sends you down the right path automatically. One exception: if your workspace allows both passwords and emailed codes, you can switch between them on the sign-in screen. If your email isn't recognized, ask your administrator to invite you.

## Authentication methods

Method

What happens

**SSO (OIDC or SAML)**

Ema hands you off to your organization's identity provider (for example, Okta or Microsoft Entra ID). You authenticate there and are redirected back to Ema.

**One-time passcode (OTP)**

Ema emails you a 6-character code. You enter it on the verification screen. This is the default for workspaces that don't use SSO or passwords.

**Password**

Available only when password sign-in is enabled for your workspace. You enter your password after your email.

## Step by step

### 1\. Open the sign-in page

Go to your workspace's Ema URL in a current version of Chrome, Edge, Firefox, or Safari. You'll see the sign-in screen with a single email field.

### 2\. Enter your email

Type the email address your administrator invited you with and select **Continue**. Ema resolves the right method for your account:

-   **SSO**: Ema redirects you to your identity provider.
-   **Password**: Ema shows a password field (only if password sign-in is enabled).
-   **OTP**: Ema emails you a 6-character one-time passcode and shows the code-entry screen.

### 3\. Complete the first step

**If you're sent to SSO:**

1.  Sign in with your identity provider as you normally would.
2.  Your provider redirects you back to Ema, which finalizes the session and lands you on **Home**.

Ema supports both OIDC and SAML identity providers; the return trip is handled automatically by Ema's OIDC or SAML callback.

**If you receive a one-time passcode:**

1.  Check your email for a message from Ema containing a 6-character code.
2.  Enter the code on the verification screen. The screen shows a countdown until the code expires.
3.  Select **Verify code**.

If your workspace also allows passwords, you can select **Sign in with password instead**.

> [TIP]
> If the code doesn't arrive, check your spam folder, then select **Request a new code**. After too many requests or failed attempts in a short window, sign-in is temporarily locked and the screen shows a countdown until you can try again.

**If you're shown a password field:**

1.  Enter your password.
2.  Select **Sign in**.

To get a code by email instead, select **Email me a code instead**.

### 4\. Complete two-factor authentication (if required)

If your workspace requires 2FA, Ema adds a second step after you pass the first one. There are two cases.

**You already have an authenticator enrolled.** Ema shows the **Two-factor authentication** screen:

1.  Open your authenticator app and read the current 6-digit code.
2.  Enter the code and select **Verify**.
3.  If you've lost your device, select **Use a backup code instead** and enter one of the backup codes you saved during setup.

**You need to set up an authenticator (first-time enrollment).** Ema takes you to the TOTP setup flow:

1.  **Scan**: Scan the QR code with an authenticator app (such as Google Authenticator, Authy, or 1Password). If you can't scan, enter the manual setup key shown below the code. Then select **Next: enter code**. The setup session has a countdown; if it expires, select **Back to sign in** and start again.
2.  **Confirm**: Enter the current 6-digit code from your app and select **Confirm**.
3.  **Save your backup codes**: Ema shows a set of one-time backup codes. Select **Download codes**, or copy them, and store them somewhere safe; each one lets you sign in once if you lose your authenticator. Check **I've saved these codes somewhere safe**, then select **Continue to Ema**.

After 2FA succeeds, Ema lands you on **Home**.

## Where you land

After a successful sign-in, you arrive at **Home**. From here you can:

-   Select **Ask Ema**, or use the box on Home, to build, run, or explain something.
-   Browse Hubs of ready-made AI Employees.
-   Open **AI Employees** in the sidebar to browse and open AI Employees that have been shared with you, or search for one by name.
-   If you have a builder role, select **Build an AI Employee** on the AI Employees page to start creating. See [Create Your First AI Employee](/builder/v2/getting-started/create-your-first-ai-employee).

If you belong to more than one workspace, you land in your default one. To switch, select your name at the bottom of the sidebar, then **Switch** next to **Current workspace**. To change your default, open **Account settings** and use **Home Tenant**, your default workspace.

## Session and security defaults

Ema issues a short-lived access token plus a longer-lived refresh token when you sign in. The refresh token keeps your session alive in the background, so you usually stay signed in across page reloads without re-authenticating. These lifetimes are set by the auth service and can be tuned per deployment.

Setting

Default

What it controls

Access-token lifetime

15 minutes

How long a single access token is valid before it is silently refreshed in the background. By default, 15 minutes (configurable per deployment).

Refresh-token lifetime

7 days

The maximum length of an idle session. After this, you sign in again. By default, 7 days (configurable per deployment).

Account-lockout window

10 minutes

How long sign-in is temporarily locked after too many failed code entries or code requests. By default, 10 minutes (configurable per deployment).

The temporary lockout is triggered in two ways, both configurable per deployment:

-   **Too many failed code entries**: by default, after 3 failed one-time-passcode or two-factor code entries.
-   **Too many code requests**: by default, after 3 one-time-passcode requests within a 10-minute window.

When a lockout is in effect, the sign-in screen shows a countdown until you can try again. The one-time passcode itself also expires: by default, 10 minutes after it is sent, which is the countdown shown on the code-entry screen.

> [INFO]
> **These are defaults, not guarantees.** Each value is set for each Ema deployment, so your workspace's lifetimes and lockout window may differ from the defaults above.

## Troubleshooting

Problem

What to do

Email isn't recognized

The app may say "We couldn't find an account for that email." Your address hasn't been added to the workspace. Ask your administrator to invite you.

The one-time passcode never arrives

Check your spam folder. Wait for the resend cooldown, then select **Request a new code**.

"Sign-in is temporarily unavailable"

A transient error reaching the sign-in service. Wait a moment and try again; if it persists, contact your administrator.

Sign-in is temporarily locked

Too many attempts or code requests triggered a cooldown. Wait for the on-screen countdown to finish, then try again.

"Single sign-on failed"

Try again. If it keeps happening, your identity provider may not grant access to the Ema application. Contact your IT team to confirm Ema is assigned to your account.

Forgot your password

Ask an administrator of your default (home) workspace to send you a password reset link. The link opens **Set your password**.

Lost your authenticator

On the two-factor screen, select **Use a backup code instead** and enter one of the codes you saved at setup. Using a backup code resets enrollment, so you'll set up a new authenticator afterward.

## What's next

-   [Create Your First AI Employee](/builder/v2/getting-started/create-your-first-ai-employee): build, test, and publish an AI Employee end to end.
-   [AI Employee Types](/builder/v2/getting-started/ai-employee-types): decide which interaction type fits your use case.
