Service Graph Connector GCP - Error: Unable to make a connection to GCP API call. Please check your credential configuration. Check system log for more details. Issue <!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } We have followed the steps as mentioned in below KB article for SGC - GCP setup:https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1220598But in "test theConnection" step getting below error:Error executing script : org.mozilla.javascript.JavaScriptException: Error: Unable to make a connection to GCP API call. Please check your credential configuration. Check system log for more details. (sys_script_include.e6ff835743ea51105dd500485bb8f225.script; line 17) Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } All versions Cause<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Data sources are not mapped with organisational credential record. Resolution<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } In the guided setup, the step "Map Data Sources with Organization-Credential Record" needs to be configured properly to map the credential records to data source. If it is configured correctly, it will map the credentials to the data sources in below table.sn_gcp_integ_m2m_ocr_ds If the mapping is not done, this table will be empty. This table is being queried when we execute the test connection. Script includes used: https://<Instance Name>/sys_script_include.do?sys_id=e6ff835743ea51105dd500485bb8f225loadData: function(import_set_table, dataSourceSysId) { var retryCount = 0; var isFailed = true; var statusCode; while (retryCount < this.API_RETRY_MAX) { var inputs = {}; try { inputs = this.sgGcpDataSourceUtils.getOrgIdAndToken(dataSourceSysId); } catch (ex) { gs.error("GCP_ORG_ABORT_LOAD::Aborting data load for SG-GCP Organization due to " + ex); throw gs.getMessage("Error: Unable to make a connection to GCP API call. Please check your credential configuration. Check system log for more details."); } https://<Instance Name>/sys_script_include.do?sys_id=62c6136753b111105dd5ddeeff7b125a getOrgIdAndToken: function(dataSourceSysId) { var m2mGr = new GlideRecordSecure("sn_gcp_integ_m2m_ocr_ds"); m2mGr.addEncodedQuery('datasource=' + dataSourceSysId); m2mGr.query(); if (m2mGr.getRowCount() > 0) { m2mGr.next(); var orgCredGr = m2mGr.credential.getRefRecord(); var svc_account = orgCredGr.getValue('service_account').trim(); var jwt_provider = orgCredGr.getValue('jwt_provider'); var obj = {}; obj.token = this.generateToken(svc_account, jwt_provider); obj.organization_id = orgCredGr.getValue('org_id').trim(); return obj; } else throw "GCP_DS_CRED_MAPPING_ABSENT::Data source not mapped with credential. Please complete mapping step in setup."; }, Once the step "Map Data Sources with Organization-Credential Record" was reconfigured, the data sources were mapped with the organisational credential record. Also the table sn_gcp_integ_m2m_ocr_ds got populated and the test connection was successful. Note: When this step is configured, we should be in SGC - GCP application scope.