|
| 1 | +--- |
| 2 | +title: Single Sign-On (SSO) |
| 3 | +description: Configure SSO with OIDC providers like Okta, Azure AD, and Google Workspace |
| 4 | +slug: /administration/access-control/sso |
| 5 | +--- |
| 6 | + |
| 7 | +# Single Sign-On (SSO) |
| 8 | + |
| 9 | +Single Sign-On enables your organization to centralize authentication through your existing identity provider (IdP) such as Okta, Azure AD, or Google Workspace. |
| 10 | + |
| 11 | +:::info[Plan availability] |
| 12 | +SSO is available on **Business** and **Enterprise** plans. You can upgrade from your billing settings or see options at https://agenta.ai/pricing. |
| 13 | +::: |
| 14 | + |
| 15 | +## Why Use SSO? |
| 16 | + |
| 17 | +SSO provides team benefits: |
| 18 | + |
| 19 | +- **Centralized access control**: Manage access through your IdP |
| 20 | +- **Improved security**: Enforce your organization's authentication policies |
| 21 | +- **Better compliance**: Meet audit and compliance requirements |
| 22 | +- **User convenience**: One set of credentials for all applications |
| 23 | +- **Immediate deprovisioning**: Revoke access instantly when employees leave |
| 24 | + |
| 25 | +## Supported Protocols |
| 26 | + |
| 27 | +Agenta currently supports **OpenID Connect (OIDC)** for SSO (with SAML/SCIM coming soon). This works with most enterprise identity providers: |
| 28 | + |
| 29 | +- Okta |
| 30 | +- Azure Active Directory (Entra ID) |
| 31 | +- Google Workspace |
| 32 | +- Auth0 |
| 33 | +- OneLogin |
| 34 | +- Any OIDC-compliant provider |
| 35 | + |
| 36 | +## Setting Up SSO |
| 37 | + |
| 38 | +### Prerequisites |
| 39 | + |
| 40 | +Before configuring SSO: |
| 41 | + |
| 42 | +1. Business or Enterprise plan subscription |
| 43 | +2. Owner or Admin role (organization) |
| 44 | +3. Admin access to your identity provider |
| 45 | +4. OIDC application credentials from your IdP |
| 46 | + |
| 47 | +### Step 1: Configure Your Identity Provider |
| 48 | + |
| 49 | +Create an OIDC application in your IdP with these settings: |
| 50 | + |
| 51 | +| Setting | Value | |
| 52 | +|---------|-------| |
| 53 | +| **Application Type** | Web Application | |
| 54 | +| **Grant Type** | Authorization Code | |
| 55 | +| **Redirect URI** | `https://{region}.cloud.agenta.ai/auth/callback/sso:{organization_slug}:{provider_slug}` | |
| 56 | +| **Scopes** | `openid`, `email`, `profile` | |
| 57 | + |
| 58 | +You'll need these values from your IdP: |
| 59 | +- **Issuer URL**: Your IdP's issuer endpoint |
| 60 | +- **Client ID**: Application/Client ID |
| 61 | +- **Client Secret**: Application/Client Secret |
| 62 | + |
| 63 | +### Step 2: Add Provider in Agenta |
| 64 | + |
| 65 | +1. Navigate to **Settings** → **Access & Security** → **SSO Providers** |
| 66 | +2. Click **"Add Provider"** |
| 67 | +3. Enter the provider details: |
| 68 | + - Provider slu (e.g., "okta", "azure", "google") |
| 69 | + - Issuer URL |
| 70 | + - Client ID |
| 71 | + - Client Secret |
| 72 | + - Scopes (default: `openid email profile`) |
| 73 | +4. Click **"Save"** |
| 74 | + |
| 75 | +### Step 3: Test and Enable |
| 76 | + |
| 77 | +1. Click **"Enable"** on your provider |
| 78 | +2. Agenta validates the OIDC configuration |
| 79 | +3. If validation succeeds, the provider is active |
| 80 | +4. Test by signing in with SSO |
| 81 | + |
| 82 | +### Step 4: Enable SSO for Your Organization |
| 83 | + |
| 84 | +1. Navigate to **Settings** → **Access & Security** → **Authentication** |
| 85 | +2. Enable **"Allow SSO"** |
| 86 | +3. Save changes |
| 87 | + |
| 88 | +Users can now sign in using SSO. |
| 89 | + |
| 90 | +## SSO Enforcement |
| 91 | + |
| 92 | +### Gradual Rollout |
| 93 | + |
| 94 | +We recommend a phased approach to SSO adoption: |
| 95 | + |
| 96 | +#### Phase 1: SSO Available (Optional) |
| 97 | + |
| 98 | +``` |
| 99 | +allow_email: true |
| 100 | +allow_social: true |
| 101 | +allow_sso: true |
| 102 | +``` |
| 103 | + |
| 104 | +- SSO is available as an option |
| 105 | +- Users can choose any authentication method |
| 106 | +- Good for testing |
| 107 | + |
| 108 | +#### Phase 2: SSO Encouraged |
| 109 | + |
| 110 | +- Same settings as Phase 1 |
| 111 | +- Communicate to users: "Please start using SSO" |
| 112 | +- Monitor adoption |
| 113 | + |
| 114 | +#### Phase 3: SSO Required |
| 115 | + |
| 116 | +``` |
| 117 | +allow_email: false |
| 118 | +allow_social: false |
| 119 | +allow_sso: true |
| 120 | +``` |
| 121 | + |
| 122 | +- Only SSO authentication allowed |
| 123 | +- Email and social sign-in disabled |
| 124 | + |
| 125 | +:::warning[Prevent Lockout] |
| 126 | +Always ensure at least one authentication method is available. Consider keeping a backup admin account with email access (`allow_root: true`) until SSO is fully tested. |
| 127 | +::: |
| 128 | + |
| 129 | +## Multiple SSO Providers |
| 130 | + |
| 131 | +Organizations can configure multiple SSO providers: |
| 132 | + |
| 133 | +**Use cases:** |
| 134 | +- Regional identity providers |
| 135 | +- Backup providers for redundancy |
| 136 | +- Different providers for different user groups |
| 137 | + |
| 138 | +Users choose which provider to authenticate with when signing in. |
| 139 | + |
| 140 | +## Provider-Specific Guides |
| 141 | + |
| 142 | +### Okta |
| 143 | + |
| 144 | +1. **Create Application** |
| 145 | + - Applications → Create App Integration |
| 146 | + - Sign-in method: OIDC |
| 147 | + - Application type: Web Application |
| 148 | + |
| 149 | +2. **Configure Settings** |
| 150 | + - Sign-in redirect URI: `https://{region}.cloud.agenta.ai/auth/callback/sso:{organization_slug}:okta` |
| 151 | + - Sign-out redirect URI: `https://{region}.cloud.agenta.ai` |
| 152 | + - Assignments: Assign users/groups |
| 153 | + |
| 154 | +3. **Get Credentials** |
| 155 | + - Copy Client ID |
| 156 | + - Copy Client Secret |
| 157 | + - Issuer URL: `https://{your-domain}.okta.com` |
| 158 | + |
| 159 | +### Azure AD (Entra ID) |
| 160 | + |
| 161 | +1. **Register Application** |
| 162 | + - Azure Portal → App registrations → New registration |
| 163 | + - Supported account types: Choose appropriate option |
| 164 | + - Redirect URI: Web, `https://{region}.cloud.agenta.ai/auth/callback/sso:{organization_slug}:azure` |
| 165 | + |
| 166 | +2. **Configure Authentication** |
| 167 | + - Add platform: Web |
| 168 | + - Add redirect URIs |
| 169 | + |
| 170 | +3. **Get Credentials** |
| 171 | + - Copy Application (client) ID |
| 172 | + - Certificates & secrets → New client secret |
| 173 | + - Issuer URL: `https://login.microsoftonline.com/{tenant-id}/v2.0` |
| 174 | + |
| 175 | +### Google Workspace |
| 176 | + |
| 177 | +1. **Create OAuth Client** |
| 178 | + - Google Cloud Console → APIs & Services → Credentials |
| 179 | + - Create OAuth client ID |
| 180 | + - Application type: Web application |
| 181 | + |
| 182 | +2. **Configure Settings** |
| 183 | + - Authorized redirect URIs: `https://{region}.cloud.agenta.ai/auth/callback/sso:{organization_slug}:google` |
| 184 | + |
| 185 | +3. **Get Credentials** |
| 186 | + - Copy Client ID |
| 187 | + - Copy Client Secret |
| 188 | + - Issuer URL: `https://accounts.google.com` |
| 189 | + |
| 190 | +## Troubleshooting |
| 191 | + |
| 192 | +### "Unable to reach issuer URL" |
| 193 | + |
| 194 | +**Causes:** |
| 195 | +- Incorrect issuer URL |
| 196 | +- Network/firewall blocking connection |
| 197 | +- IdP is down |
| 198 | + |
| 199 | +**Solutions:** |
| 200 | +- Verify the issuer URL in your IdP configuration |
| 201 | +- Ensure the URL is accessible from Agenta's servers |
| 202 | +- Check your IdP's status page |
| 203 | + |
| 204 | +### "Redirect URI mismatch" |
| 205 | + |
| 206 | +**Cause:** The redirect URI in Agenta doesn't match your IdP configuration |
| 207 | + |
| 208 | +**Solution:** |
| 209 | +1. Check the exact redirect URI format |
| 210 | +2. Update your IdP to match: `https://{region}.cloud.agenta.ai/auth/callback/sso:{organization_slug}:{provider_slug}` |
| 211 | +3. Ensure no trailing slashes or typos |
| 212 | + |
| 213 | +### "Invalid client credentials" |
| 214 | + |
| 215 | +**Causes:** |
| 216 | +- Wrong Client ID or Secret |
| 217 | +- Credentials have been rotated |
| 218 | +- Application disabled in IdP |
| 219 | + |
| 220 | +**Solutions:** |
| 221 | +- Verify credentials in your IdP |
| 222 | +- Regenerate and update if needed |
| 223 | +- Ensure the application is enabled |
| 224 | + |
| 225 | +### Users can't sign in with SSO |
| 226 | + |
| 227 | +**Causes:** |
| 228 | +- SSO not enabled for organization |
| 229 | +- Provider not active |
| 230 | +- User not assigned in IdP |
| 231 | + |
| 232 | +**Solutions:** |
| 233 | +- Enable "Allow SSO" in organization settings |
| 234 | +- Ensure provider is enabled and validated |
| 235 | +- Assign user to the application in your IdP |
| 236 | + |
| 237 | +## Security Best Practices |
| 238 | + |
| 239 | +1. **Rotate credentials regularly**: Update Client Secret periodically |
| 240 | +2. **Use strong IdP policies**: Enforce MFA in your identity provider |
| 241 | +3. **Monitor sign-ins**: Review authentication logs |
| 242 | +4. **Test before enforcing**: Verify SSO works before disabling other methods |
| 243 | +5. **Have a backup plan**: Keep emergency access method available |
| 244 | + |
| 245 | +## FAQ |
| 246 | + |
| 247 | +### Can I use SAML instead of OIDC? |
| 248 | + |
| 249 | +Currently, only OIDC is supported. SAML support will be added in the future. |
| 250 | + |
| 251 | + |
| 252 | +### Can I use SCIM along with SSO? |
| 253 | + |
| 254 | +Currently, only SCIM is not supported. SCIM support will be added in the future. |
| 255 | + |
| 256 | +### What happens if my IdP goes down? |
| 257 | + |
| 258 | +Users won't be able to authenticate via SSO. If SSO is the only allowed method, users will be locked out until the IdP is restored. Consider keeping admin access on, on a separate non-personal account (`allow_root: true`) if this is important to you. |
| 259 | + |
| 260 | +### Can users still use email/password after SSO is enabled? |
| 261 | + |
| 262 | +Yes, unless you explicitly disable email authentication. To enforce SSO-only, set `allow_email: false` and `allow_social: false`. |
| 263 | + |
| 264 | +### How do I rotate SSO credentials? |
| 265 | + |
| 266 | +1. Generate new credentials in your IdP |
| 267 | +2. Update the provider configuration in Agenta |
| 268 | +3. Test that SSO still works |
| 269 | +4. Revoke old credentials in your IdP |
0 commit comments