---
title: "ezgh sso directory create"
description: "Enable EZGH SSO: create the organization's directory and its portal."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ezgh sso directory create

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh sso directory create --alias <alias> [--name n] [policy and branding flags] [flags]
```

Create the organization's directory. Its portal is https://&lt;alias&gt;.sso.ezgh.app, which is also the OpenID Connect issuer for its applications. An alias is 4–32 characters: lowercase letters, digits and hyphens, starting with a letter and not ending with a hyphen; some words are reserved.

The sign-in policy defaults to MFA required with passwords, TOTP and passkeys allowed, an 8-hour session and a 1-hour idle timeout. `--name` defaults to the alias. An organization has one directory.

Part of [`ezgh sso directory`](/cli/reference/sso-directory).

## Examples

```sh
ezgh sso directory create --alias acme --name "Acme Corp"
ezgh sso directory create --alias acme --allowed-factors passkey --session-duration 12h
```

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--alias` | string |  | the portal's alias: https://&lt;alias&gt;.sso.ezgh.app (4–32 lowercase letters, digits and hyphens) |
| `--allowed-factors` | strings, comma-separated or repeated | `[password,totp,passkey]` | the factors people may use: password, totp, passkey |
| `--background-color` | string | `#ffffff` | the portal's background color, #RRGGBB |
| `--idle-timeout` | duration | `1h0m0s` | how long an unused session lasts, 1m up to the session duration |
| `--logo` | string |  | a PNG or JPEG file (at most 512 KiB and 1024×1024) for the portal |
| `--mfa-required` | boolean | `true` | require a second factor (or a passkey) for hosted sign-in |
| `--name` | string |  | the directory's display name |
| `--primary-color` | string | `#2563eb` | the portal's primary color, #RRGGBB |
| `--session-duration` | duration | `8h0m0s` | how long an SSO session lasts, 5m to 24h |
| `--trust-upstream-mfa` | boolean |  | count an identity provider's MFA claim as MFA (and require it when MFA is required) |

This command also takes the [global flags](/cli/reference#global-flags).

Source: https://docs.ezghcloud.com/cli/reference/sso-directory-create/index.mdx
