{"record":{"id":"007bfc26661f2a55","repo":"bitwarden/server","slug":"free-bitwarden-families-sponsorship-has-been-disab","errorCode":null,"errorMessage":"Free Bitwarden Families sponsorship has been disabled by your organization administrator.","messagePattern":"Free Bitwarden Families sponsorship has been disabled by your organization administrator\\.","errorType":"exception","errorClass":"BadRequestException","httpStatus":400,"severity":"error","filePath":"src/Api/Billing/Controllers/OrganizationSponsorshipsController.cs","lineNumber":94,"sourceCode":"        _userService = userService;\n        _currentContext = currentContext;\n        _policyQuery = policyQuery;\n        _featureService = featureService;\n        _logger = logger;\n    }\n\n    [Authorize(\"Application\")]\n    [HttpPost(\"{sponsoringOrgId}/families-for-enterprise\")]\n    [SelfHosted(NotSelfHostedOnly = true)]\n    public async Task CreateSponsorship(Guid sponsoringOrgId, [FromBody] OrganizationSponsorshipCreateRequestModel model)\n    {\n        var sponsoringOrg = await _organizationRepository.GetByIdAsync(sponsoringOrgId);\n        var freeFamiliesSponsorshipPolicy = await _policyQuery.RunAsync(sponsoringOrgId,\n            PolicyType.FreeFamiliesSponsorshipPolicy);\n\n        if (freeFamiliesSponsorshipPolicy.Enabled)\n        {\n            throw new BadRequestException(\"Free Bitwarden Families sponsorship has been disabled by your organization administrator.\");\n        }\n\n        var sponsorship = await _createSponsorshipCommand.CreateSponsorshipAsync(\n            sponsoringOrg,\n            await _organizationUserRepository.GetByOrganizationAsync(sponsoringOrgId, _currentContext.UserId ?? default),\n            model.PlanSponsorshipType,\n            model.SponsoredEmail,\n            model.FriendlyName,\n            model.IsAdminInitiated.GetValueOrDefault(),\n            model.Notes);\n        if (sponsorship.OfferedToEmail != null)\n        {\n            await _sendSponsorshipOfferCommand.SendSponsorshipOfferAsync(sponsorship, sponsoringOrg.Name);\n        }\n    }\n\n    [Authorize(\"Application\")]\n    [Authorize<ManageUsersRequirement>]","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/bitwarden/server/blob/e93b962371d80964556f5590c6615f5160a437a1/src/Api/Billing/Controllers/OrganizationSponsorshipsController.cs#L76-L112","documentation":"Thrown (HTTP 400) when creating a Families-for-Enterprise sponsorship because the sponsoring organization has the FreeFamiliesSponsorshipPolicy enabled. Despite the optimistic policy name, an ENABLED FreeFamiliesSponsorshipPolicy DISABLES sponsorships — an org owner turned the policy on to block the feature org-wide.","triggerScenarios":"An org admin enabled the 'disable free families sponsorship' policy and a user then calls POST /{sponsoringOrgId}/families-for-enterprise; the sponsoring org is governed by an enterprise policy that cascades this restriction.","commonSituations":"Enterprise policy rollout that disables sponsorships across member organizations; admin toggled the policy after sponsorships were already being offered.","solutions":["Have an organization owner disable the FreeFamiliesSponsorshipPolicy for the sponsoring org (or the governing enterprise).","Confirm you are targeting the intended sponsoring organization.","If the policy is intentional, stop attempting to create sponsorships and communicate the restriction to users."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before offering to create a sponsorship, fetch and check the policy state.\nconst policy = await getPolicy(sponsoringOrgId, 'FreeFamiliesSponsorshipPolicy');\nif (policy.enabled) { disableCreateSponsorshipUI(); }","typeGuard":null,"tryCatchPattern":"try {\n  await createSponsorship(sponsoringOrgId, model);\n} catch (e) {\n  if (e.isBadRequest && /sponsorship has been disabled/i.test(e.message)) {\n    showPolicyNotice('Your organization administrator has disabled sponsorships.');\n  } else { throw e; }\n}","preventionTips":["Poll policy state before exposing sponsorship actions in the UI.","Hide the create-sponsorship control when the disable-policy is enabled.","Communicate enterprise policy changes to affected admins."],"tags":["billing","sponsorship","policy","organization","authorization"],"backgroundTag":null,"analyzedSha":"e93b962371d80964556f5590c6615f5160a437a1","analyzedAt":"2026-08-13T14:22:19.382Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}