prmonitor
prmonitor copied to clipboard
Error messages when a PR is protected by SAML enforcement.
Hello,
I opened some PRs on a repo on an org that has SAML enforcements. https://github.com/microsoftDocs/azure-docs/pull/94927 Later I started to see some error messages seen below.

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 "
}
}
Hi @hanefi, sorry for the delay. Feel free to open a PR to fix this :)