{"record":{"id":"6df6560352966989","repo":"bitwarden/server","slug":"the-organization-is-in-an-invalid-state-please-co","errorCode":null,"errorMessage":"The organization is in an invalid state. Please contact Customer Support.","messagePattern":"The organization is in an invalid state\\. Please contact Customer Support\\.","errorType":"exception","errorClass":"BadRequestException","httpStatus":400,"severity":"error","filePath":"bitwarden_license/src/Commercial.Core/SecretsManager/Commands/Requests/RequestSMAccessCommand.cs","lineNumber":28,"sourceCode":"\npublic class RequestSMAccessCommand : IRequestSMAccessCommand\n{\n    private readonly IMailService _mailService;\n\n    public RequestSMAccessCommand(\n        IMailService mailService)\n    {\n        _mailService = mailService;\n    }\n\n    public async Task SendRequestAccessToSM(Organization organization, ICollection<OrganizationUserUserDetails> orgUsers, User user, string emailContent)\n    {\n        var emailList = orgUsers.Where(o => o.Type <= OrganizationUserType.Admin)\n            .Select(a => a.Email).Distinct().ToList();\n\n        if (!emailList.Any())\n        {\n            throw new BadRequestException(\"The organization is in an invalid state. Please contact Customer Support.\");\n        }\n\n        var userRequestingAccess = user.Name ?? user.Email;\n        await _mailService.SendRequestSMAccessToAdminEmailAsync(emailList, organization.Name, userRequestingAccess, emailContent);\n    }\n}\n","sourceCodeStart":10,"sourceCodeEnd":35,"githubUrl":"https://github.com/bitwarden/server/blob/e93b962371d80964556f5590c6615f5160a437a1/bitwarden_license/src/Commercial.Core/SecretsManager/Commands/Requests/RequestSMAccessCommand.cs#L10-L35","documentation":"Error \"The organization is in an invalid state. Please contact Customer Support.\" thrown in bitwarden/server.","triggerScenarios":"Thrown by RequestSMAccessCommand when the organization is not in a state that allows requesting Secrets Manager access, e.g., missing billing/subscription state or an inconsistent organization record.","commonSituations":"See trigger scenarios.","solutions":["Verify the organization has an active subscription and Secrets Manager enabled before requesting access.","Have an organization owner or admin confirm the organization is not disabled or suspended.","Contact Bitwarden Customer Support with the organization ID so the invalid state can be corrected."],"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"}