Error messages

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

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月29日 UTC.