Error messages

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"
        }
      }
    ]
  }
}