Google Validate Service Account pattern fails with error "Cloud REST Query. Custom operation Failed to run script due to the following error: JAVASCRIPT_CODE_FAILURE:"Issue While executing the Discovery or creating a new Discovery Schedule for the Google Service Account, observed the below error even the provided Credentials are working for Datacenter Discovery and Organization level Discovery also works as expected 2022-09-08 16:07:28: setAttribute(method,GET)2022-09-08 16:07:28: setAttribute(formatted,true)2022-09-08 16:07:28: setAttribute(body,)2022-09-08 16:07:28: setAttribute(url,https://cloudresourcemanager.googleapis.com/v2/folders/<Flodername>)2022-09-08 16:07:28: setAttribute(headers,null)2022-09-08 16:07:28: setAttribute(body,null)2022-09-08 16:07:29: Exception occurred while executing operation Cloud REST Query. Custom operation Failed to run script due to the following error: JAVASCRIPT_CODE_FAILURE: com.snc.sw.exception.CommandFailureException: Cloud request failed. URL: https://cloudresourcemanager.googleapis.com/v2/folders/<Flodername> Status: 400 Response: HttpResponseProxy{HTTP/1.1 400 Bad Request [Vary: X-Origin, Vary: Referer, Content-Type: application/json; charset=UTF-8, Date: Thu, 08 Sep 2022 14:07:29 GMT, Server: ESF, Cache-Control: private, X-XSS-Protection: 0, X-Frame-Options: SAMEORIGIN, X-Content-Type-Options: nosniff, Server-Timing: gfet4t7; dur=573, Accept-Ranges: none, Vary: Origin,Accept-Encoding, Connection: close, Transfer-Encoding: chunked] ResponseEntityProxy{[Content-Type: application/json; charset=UTF-8,Chunked: true]}} (script_include:GoogleApiCommand; line 124). Custom operation Failed to run script due to the following error: JAVASCRIPT_CODE_FAILURE: com.snc.sw.exception.CommandFailureException: Cloud request failed. URL: https://cloudresourcemanager.googleapis.com/v2/folders/<Flodername> Status: 400 Response: HttpResponseProxy{HTTP/1.1 400 Bad Request [Vary: X-Origin, Vary: Referer, Content-Type: application/json; charset=UTF-8, Investigations The initial investigations, above error says the pattern is getting failed due to the credentials, requested to communicate with GCP administrator to verify if the below API has access for Discovery Reviewed the Article representing the error: Google Cloud Discovery Validate Service Account pattern errorGCP Cred: Not defining a MID Server from the "Specific MID Servers"Test the Credentials as per "Google - GCP Pattern Discovery Errors" Resolution The GCP service account has the role VIEWER has requested on documentation, after investigations adding the role VIEWER seems to solve the access error. (used this role for pattern: Discover Google Organizations)