Skip to main content

Triage and Remediation

Remediation

Using Console

In GitHub, “Org plan limit” typically means you’re trying to do something that exceeds what your current organization plan allows (seats, repos, SAML/SSO, code security, etc.). Remediation is done via the GitHub web console.Below are step‑by‑step options to fix it, depending on what’s being blocked.

1. Identify exactly what limit you’ve hit

  1. Sign in to GitHub.
  2. Open your organization:
    • Top‑right profile icon → Your organizations → click the org.
  3. Check the banner or error:
    • Try to repeat the action that failed (e.g., add a member, enable a feature).
    • GitHub usually shows a message like:
      • “You have reached the maximum number of members for your plan”
      • “This feature is available on GitHub Enterprise plan”
      • “You have reached the limit for private repositories”
  4. In the org:
    • Go to Settings (left sidebar).
    • Under Billing & plans, open:
      • Plans and usage and
      • Billing
    • Review:
      • Seats used vs seats available
      • Repositories limits (if applicable)
      • Whether the blocked feature requires a higher plan
This tells you whether you must upgrade or free capacity.

2. Remediate by upgrading the organization plan

If the error indicates you’ve reached a feature/seat limit that only a higher plan supports:
  1. In the organization:
    • Go to SettingsBilling & plansPlans and usage.
  2. Click Change plan or Upgrade.
  3. Compare plans and pick one that removes the specific limit:
    • Often GitHub Enterprise Cloud is required for advanced IAM/SSO features.
  4. Confirm billing details and apply the upgrade.
After upgrade, retry the blocked IAM action (e.g., adding members, enabling SSO, assigning roles).

3. Remediate by freeing up seats (members limit)

If you hit a member/seat limit and don’t want to upgrade:
  1. In the organization:
    • People (left sidebar).
  2. Remove inactive or unneeded members:
    • Click a member → Remove from organization.
  3. Or downgrade outside collaborators:
    • Go to SettingsOutside collaborators.
    • Remove collaborators or limit their repo access to free capacity.
  4. Once seats are freed, reattempt the IAM action (add user, modify team, etc.).

4. Remediate by reducing private repositories (if repo limit)

If the limit is around private repos in your plan:
  1. In the org:
    • Click Repositories.
  2. Sort/filter to find unused internal/private repos.
  3. For each:
    • Open the repo → Settings → scroll down to Danger ZoneDelete this repository (or Archive if deletion isn’t required but you just want to stay under soft guidance).
  4. Retry the action that triggered the limit.

5. Remediate for IAM/SSO features restricted by plan

If you’re configuring SAML SSO, SCIM, or advanced IAM that requires Enterprise:
  1. Confirm the feature requires GitHub Enterprise Cloud:
    • In org SettingsSecurity (e.g., SAML single sign‑on).
    • Banner will usually say it’s only available on Enterprise.
  2. If you need it:
    • Follow step 2 to upgrade the plan.
  3. After upgrade:
    • Re-open SettingsSecurity → set up SAML / SCIM / OIDC as needed.

6. Governance step (to prevent re‑hitting the limit)

  1. In org SettingsBilling & plansPlans and usage:
    • Periodically review usage.
  2. Establish internal policy:
    • Require removing users who no longer need access.
    • Regular cleanup of dormant repos.
  3. If growth is predictable, choose a plan that matches expected user and repo counts.

If you can share the exact text of the “Org Plan Limit” error or a screenshot (with sensitive data redacted), I can give you a precise, click‑by‑click remediation for that specific IAM operation in the GitHub console.
For the specific “Org Plan Limit” issue in GitHub, there is no remediation you can perform via GitHub CLI, because:
  • “Org Plan Limit” is a billing/plan constraint (e.g., number of seats, features, storage, minutes), not an IAM permission or configuration setting.
  • The GitHub CLI (gh) does not expose any commands to change billing, subscription, or plan type for an organization.
So, from the standpoint of “GitHub IAM using GitHub CLI,” there is nothing you can run that directly raises or changes the “Org Plan Limit” itself.

What you can do (indirectly) via CLI

Depending on what is hitting the plan limit, you can use gh to reduce usage so you’re under the current plan’s caps:
  1. List and remove unneeded organization members
  2. List and archive/delete unused repositories
…but this only helps if your plan limit finding is about over‑usage (e.g., too many seats, too many private repos on a legacy plan, etc.).

How to actually remediate the “Org Plan Limit”

This must be done in the GitHub web UI (not via gh):
  1. Sign in as an organization owner.
  2. Go to:
    https://github.com/organizations/ORG_NAME/settings/billing
  3. Review what limit is being hit (seats, storage, Actions minutes, etc.).
  4. Choose one:
    • Upgrade your plan (e.g., to Team or Enterprise) or add more seats/minutes/storage.
    • Or reduce usage (members, private repos, Actions minutes, packages storage).
If you can share the exact text of the finding (e.g., from a scanner like Wiz/Prisma/Defender for DevOps), I can give you a more targeted sequence of gh commands to reduce whatever is exceeding the limit, but the actual plan change cannot be automated with GitHub CLI.
In GitHub you cannot “fix” an Org plan limit error purely with IAM or Python – it’s a hard SaaS quota. What you can do with Python is:
  • Detect which limit you’re hitting
  • Clean up / downsize usage (members, repos, seats, actions minutes, etc.) so you fall back under the plan limit
Below is a minimal, step‑by‑step way to do that using Python and the GitHub API (via PyGithub).

1. Identify the exact error / limit

When you hit plan limits via API you’ll typically see:
  • HTTP 403 with a message like org plan limit reached or similar
  • Response body with a more specific message (e.g., seats, repos, private repos, etc.)
Make a failing call once and print the full response:
Use that message to understand which org plan limit you’re hitting (members/seats, repos, private repos, Actions, Codespaces, etc.).

2. General remediation strategy

For any org plan limit, you have only two levers:
  1. Upgrade the GitHub plan (Org / Enterprise settings → Billing)
  2. Reduce usage of the constrained resource with Python automation (members, repos, runners, etc.)
Below are common limits and how to reduce usage via Python.

3. Example: Hit “member/seat” limit – auto-remove inactive members

If the message indicates you’re out of seats/members, remove inactive members or convert them to outside collaborators.

3.1 Install PyGithub

3.2 Script: list members & last activity

Review the list manually first.

3.3 Script: remove selected inactive members

This frees seats so new members can be added without hitting the plan limit.

4. Example: Hit “private repo” limit – clean up old private repos

Then archive or delete selected repos:
Archiving or deleting old private repos brings you under private-repo limits.

5. Example: Hit GitHub Actions minutes / storage limits

You cannot exceed the quota without upgrading; you can only:
  • Disable Actions for some repos
  • Limit usage via org policies
Disable Actions for specific repos via API:

6. IAM angle: enforce limits programmatically

You can create your own “soft IAM policy” layer in Python that:
  • Checks org usage before adding members / creating repos
  • Refuses operations that would hit the plan limit
Example pattern:

7. When you must upgrade

If:
  • You’ve already removed inactive accounts/repositories and
  • You still need more seats, private repos, Actions minutes, or other features
…the only real remediation is to upgrade the org’s billing plan in the GitHub UI (or via your account team if on Enterprise). Python or IAM cannot bypass or raise those hard SaaS limits.
If you paste the exact API error message you’re seeing (with the org plan limit text), I can give you a tighter Python script tailored to that specific limit (members vs private repos vs Actions, etc.).
Terraform cannot remediate GitHub organization seat limits or payment plans.The fixes for this finding are:
  • Remove unused members from the organization via the GitHub UI or API (e.g., Organization Settings → People, or the REST API to remove members), and/or
  • Upgrade the organization’s GitHub plan / licensed seats via GitHub Billing settings.
These actions are not exposed as arguments in the integrations/github provider, so no valid Terraform configuration can implement the recommended remediation.