Skip to content
This repository was archived by the owner on Mar 29, 2026. It is now read-only.
This repository was archived by the owner on Mar 29, 2026. It is now read-only.

Error messages when a PR is protected by SAML enforcement. #1042

Description

@hanefi

Hello,

I opened some PRs on a repo on an org that has SAML enforcements. MicrosoftDocs/azure-docs#94927 Later I started to see some error messages seen below.

image

I copied the error message, formatted it, and opened the link in x-github-sso field on a browser to resolve the issue.

Below is the formatted error message in the screenshot:

Error: Resource protected by organization SAML enforcement. You must grant your Personal Access token access to this organization.:

{
  "response": {
    "data": { "repository": { "pullRequest": null } },
    "errors": [
      {
        "type": "FORBIDDEN",
        "path": ["repository", "pullRequest"],
        "extensions": { "saml_failure": true },
        "locations": [{ "line": 4, "column": 13 }],
        "message": "Resource protected by organization SAML enforcement. You must grant your Personal Access token access to this organization."
      }
    ],
    "status": 200,
    "headers": {
      "map": {
        "content-type": "application/json; charset=utf-8",
        "x-accepted-oauth-scopes": "repo",
        "x-github-media-type": "github.v4; format=json",
        "x-github-request-id": "4DB7:B4C3:6700A9:699AB9:62BD6AC5",
        "x-github-sso": "required; url=https://github.com/enterprises/microsoftopensource/sso?authorization_request=ABTV<redacted>",
        "x-oauth-scopes": "repo",
        "x-ratelimit-limit": "5000",
        "x-ratelimit-remaining": "4913",
        "x-ratelimit-reset": "1656584225",
        "x-ratelimit-resource": "graphql",
        "x-ratelimit-used": "87"
      }
    }
  },
  "request": {
    "query": "\n query {\n repository(owner: \"MicrosoftDocs\", name: \"azure-docs\") {\n pullRequest(number: 94927) {\n reviewDecision\n commits(last: 1) {\n nodes {\n commit {\n statusCheckRollup {\n state\n }\n }\n }\n }\n }\n }\n }\n "
  }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions