Stay organized with collections
Save and categorize content based on your preferences.
This page identifies some of the errors and messages that are returned when you use
organization restrictions.
Permission denied error message sample
If a request is denied due to an organization restrictions header violation, a 403
HTTP Response is returned with the following details:
{"error":{"code":403,"message":"Access denied by organization restriction. Please contact your administrator for additional information.","status":"PERMISSION_DENIED","details":[{"@type":"type.googleapis.com/google.rpc.ErrorInfo","reason":"ORG_RESTRICTION_VIOLATION","domain":"googleapis.com","metadata":{"service":"abc.googleapis.com"}}]}}
Malformed header error message sample
If a request contains a malformed X-Goog-Allowed-Resources header, a 400 HTTP response is returned with the following details:
{"error":{"code":400,"message":"Org Restriction Header is not valid. Please pass a valid Org Restriction Header.","status":"INVALID_ARGUMENT","details":[{"@type":"type.googleapis.com/google.rpc.ErrorInfo","reason":"ORG_RESTRICTION_HEADER_INVALID","domain":"googleapis.com","metadata":{"service":"abc.googleapis.com"}}]}}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["# Error messages\n\nThis page identifies some of the errors and messages that are returned when you use\norganization restrictions.\n\n### Permission denied error message sample\n\nIf a request is denied due to an organization restrictions header violation, a 403\nHTTP Response is returned with the following details: \n\n {\n \"error\": {\n \"code\": 403,\n \"message\": \"Access denied by organization restriction. Please contact your administrator for additional information.\",\n \"status\": \"PERMISSION_DENIED\",\n \"details\": [\n {\n \"@type\": \"type.googleapis.com/google.rpc.ErrorInfo\",\n \"reason\": \"ORG_RESTRICTION_VIOLATION\",\n \"domain\": \"googleapis.com\",\n \"metadata\": {\n \"service\": \"abc.googleapis.com\"\n }\n }\n ]\n }\n }\n\n### Malformed header error message sample\n\nIf a request contains a malformed `X-Goog-Allowed-Resources` header, a 400 HTTP response is returned with the following details: \n\n {\n \"error\": {\n \"code\": 400,\n \"message\": \"Org Restriction Header is not valid. Please pass a valid Org Restriction Header.\",\n \"status\": \"INVALID_ARGUMENT\",\n \"details\": [\n {\n \"@type\": \"type.googleapis.com/google.rpc.ErrorInfo\",\n \"reason\": \"ORG_RESTRICTION_HEADER_INVALID\",\n \"domain\": \"googleapis.com\",\n \"metadata\": {\n \"service\": \"abc.googleapis.com\"\n }\n }\n ]\n }\n }"]]