{"record":{"id":"fad6ee5a11f2e2aa","repo":"bitwarden/server","slug":"cannot-autoscale-on-a-self-hosted-instance","errorCode":null,"errorMessage":"Cannot autoscale on a self-hosted instance.","messagePattern":"Cannot autoscale on a self-hosted instance\\.","errorType":"exception","errorClass":"BadRequestException","httpStatus":400,"severity":"error","filePath":"src/Api/AdminConsole/Controllers/OrganizationUsersController.cs","lineNumber":785,"sourceCode":"    [HttpPut(\"enable-secrets-manager\")]\n    [Authorize<ManageUsersRequirement>]\n    public async Task BulkEnableSecretsManagerAsync(Guid orgId,\n        [FromBody] OrganizationUserBulkRequestModel model)\n    {\n        var orgUsers = (await _organizationUserRepository.GetManyAsync(model.Ids))\n            .Where(ou => ou.OrganizationId == orgId && !ou.AccessSecretsManager).ToList();\n        if (orgUsers.Count == 0)\n        {\n            throw new BadRequestException(\"Users invalid.\");\n        }\n\n        var additionalSmSeatsRequired = await _countNewSmSeatsRequiredQuery.CountNewSmSeatsRequiredAsync(orgId, orgUsers.Count);\n        if (additionalSmSeatsRequired > 0)\n        {\n            // Self-hosted instances can't autoscale their Stripe subscription, so reject before touching billing.\n            if (_globalSettings.SelfHosted)\n            {\n                throw new BadRequestException(new V2_UpdateUserCommand.CannotAutoscaleSecretsManagerSeatsOnSelfHost().Message);\n            }\n\n            var organization = await _organizationRepository.GetByIdAsync(orgId);\n            var plan = await _pricingClient.GetPlanOrThrow(organization!.PlanType);\n            var update = new SecretsManagerSubscriptionUpdate(organization, plan, true)\n                .AdjustSeats(additionalSmSeatsRequired);\n            await _updateSecretsManagerSubscriptionCommand.UpdateSubscriptionAsync(update);\n        }\n\n        foreach (var orgUser in orgUsers)\n        {\n            orgUser.AccessSecretsManager = true;\n        }\n\n        await _organizationUserRepository.ReplaceManyAsync(orgUsers);\n    }\n\n    /// <summary>","sourceCodeStart":767,"sourceCodeEnd":803,"githubUrl":"https://github.com/bitwarden/server/blob/e93b962371d80964556f5590c6615f5160a437a1/src/Api/AdminConsole/Controllers/OrganizationUsersController.cs#L767-L803","documentation":"Error \"Cannot autoscale on a self-hosted instance.\" thrown in bitwarden/server.","triggerScenarios":"Thrown when a request attempts to enable or use seat autoscaling on a self-hosted Bitwarden instance, where autoscaling is only supported on the cloud service.","commonSituations":"See trigger scenarios.","solutions":["Set explicit seat counts instead of using autoscale; self-hosted instances manage seats via the license.","Contact Bitwarden sales/support to adjust the licensed seat count for the self-hosted installation."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e93b962371d80964556f5590c6615f5160a437a1","analyzedAt":"2026-08-13T14:22:19.382Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}