bitwarden/server · error · Exception
NoSeatsAvailable
Error message
NoSeatsAvailable
What it means
Thrown in AccountController.CreateUserAndOrgUserConditionallyAsync (line 655) when JIT provisioning needs a new seat (availableSeats < 1 and possibleOrgUser is null) but AutoAddSeatsAsync fails. The inner catch reverts any partial seat adjustment and re-throws with the organization's display name. On self-hosted instances, autoscaling is disabled entirely and always throws.
Source
Thrown at bitwarden_license/src/Sso/Controllers/AccountController.cs:655
try
{
if (_globalSettings.SelfHosted)
{
throw new Exception("Cannot autoscale on self-hosted instance.");
}
await _organizationService.AutoAddSeatsAsync(organization, 1);
}
catch (Exception e)
{
if (organization.Seats.Value != initialSeatCount)
{
await _organizationService.AdjustSeatsAsync(organization.Id,
initialSeatCount - organization.Seats.Value);
}
_logger.LogInformation(e, "SSO auto provisioning failed");
throw new Exception(_i18nService.T("NoSeatsAvailable", organization.DisplayName()));
}
}
}
// If the email domain is verified, we can mark the email as verified
if (string.IsNullOrWhiteSpace(email))
{
throw new Exception(_i18nService.T("CannotFindEmailClaim"));
}
var emailVerified = false;
var emailDomain = CoreHelpers.GetEmailDomain(email);
if (!string.IsNullOrWhiteSpace(emailDomain))
{
var organizationDomain =
await _organizationDomainRepository.GetDomainByOrgIdAndDomainNameAsync(organization.Id, emailDomain);
emailVerified = organizationDomain?.VerifiedDate.HasValue ?? false;
}View on GitHub (pinned to e93b962371)
Solutions
- On self-hosted: manually increase the organization's seat count via the admin portal or database before the user retries SSO.
- On cloud: upgrade the org plan or purchase additional seats, then retry.
- Verify the org's billing is current and the payment method is valid.
- Check server logs for the inner exception from AutoAddSeatsAsync for billing API errors.
Defensive patterns
Strategy: try-catch
Validate before calling
// Before JIT provisioning, check available seats
if (possibleOrgUser == null && organization.Seats.HasValue)
{
var occupied = await _organizationRepository.GetOccupiedSeatCountByOrganizationIdAsync(organization.Id);
if (organization.Seats.Value - occupied.Total < 1 && _globalSettings.SelfHosted)
return BadRequest("No seats available. An admin must increase the seat count.");
} Try / catch
try { await CreateUserAndOrgUserConditionallyAsync(...); }
catch (Exception ex) when (ex.Message.Contains("NoSeatsAvailable"))
{ /* notify admin to purchase/increase seats; retry after */ } Prevention
- On self-hosted: pre-allocate enough seats for expected JIT-provisioned users.
- On cloud: keep billing current and auto-scale enabled.
- Monitor seat utilization and alert admins before capacity is reached.
When it happens
Trigger: A new user is being JIT-provisioned, the organization has a seat limit, all seats are occupied, and the server cannot auto-add seats (self-hosted, or cloud billing/plan limit reached).
Common situations: Self-hosted instance where seat autoscaling is not supported; cloud org at its plan's maximum seat count; billing failure (payment method expired, subscription lapsed); plan does not support seat expansion.
Related errors
- CannotFindEmailClaim
- UserAlreadyExistsKeyConnector
- ssoOrgMembershipRequired
- Invalid Billing Sync Key
- NoDomainHintProvided
AI-assisted analysis of bitwarden/server@e93b962371 (2026-08-13).
Data as JSON: /api/errors/c33f10f12ea79ea5.
Report an issue: GitHub.