How to enter GCP Folder ID while setup service account

RK41
Tera Expert

Hi All,

 

I am trying to setup the GCP discovery and I am getting this below error while test the connection. I entered the folder id in correct way. But I wanted to know, Is there any format requires to enter the folder ID? or Did i missing anything here?

 

Error:- Provided account id is neither a GCP Folder nor a GCP Project Pattern name: Google Cloud Platform (GCP) - Validate Service Account

 

RK41_0-1676547985795.png

 

4 REPLIES 4

Kannan Nair
Tera Contributor

Hello,

 

I am also facing the same problem. Please let me know whether you were able to resolve the problem.

Vshi
Tera Contributor

Hi @RK41,

You can follow these steps, to enter the GCP discovery Folder ID while setting up a service account in ServiceNow:

  1. Open the ServiceNow portal and navigate to the "Service Account Management" page.
  2. Click on the "New" button to create a new service account.
  3. In the "General" section, enter the required details such as the name, description, and email address for the service account.
  4. In the "Discovery Credentials" section, select "Google Cloud Platform" as the credential type.
  5. Enter the GCP project ID in the "Project ID" field.
  6. Enter the GCP discovery Folder ID in the "Folder ID" field.
  7. Enter the JSON key for the service account in the "Key" field.
  8. Click on the "Test Connection" button to verify that the service account has been set up correctly.

 

Note: The GCP discovery Folder ID is the unique identifier of the folder in which the resources you want to discover are located. You can find the Folder ID in the GCP console by navigating to the folder and looking at the URL. The Folder ID is the string of letters and numbers after "folders/" in the URL.

Please hit like and mark helpful, if your query has been answered/addressed!

 

Regards,
Vamshi

Hi Vshi,

I have a Raw Key from CyberArk which is used to authenticate for GCP Discovery.

After credential rotation it's not working fine.
Error:- Provided account id is neither a GCP Folder nor a GCP Project Pattern name: Google Cloud Platform (GCP) - Validate Service Account

 

Could you please help me out to identify correct secret key from JSON.

Below is the dummy Raw cyberArk key, please check below.
"{
\"type\": \"service_account\",
\"project_id\": \"sis-Yam-prod-4X7y\",
\"private_key_id\": \"0e1234567dfs891ae0192313719eba04b1e1dea66\",
\"private_key\": \"-----BEGIN PRIVATE KEY-----\\nMIIEvwIBADANBiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDfP3YXI1boQ13g\\ntBfEWkCMbEnPqMGttVxpUQOHyom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BgQCfzzCnynI66R2FnW9ofSdQrn5ZSO1dLJKT/8pmOywdC6TlmnXI\\ns0H207sDNv86xOWvJptimevq2982SMixcMSJP+DyMzSDgB4+hWohS/7Dd+Sqk80ZIY/\\nj7lvJ1YC96F3JX3PUcNEeAx124126xuCkz6jMDEis/TpGUvn/l2ivj8sK4gnSL0GnDQKBgQDQ\\ncNOdPasjWmzIQUoatk38HPPt8++6W5iKmDfxIMRmsR6Jh1231rwremo2v6rqgaXOufc9\\nCAA+who/hmW0417+09Z8uuYHHAbgmNKQljJskua9wzTU+uhIgGO\\nKOA6MNsowHMWmAKAlGeZb/qfin0tBW6ymS0piGg+OQKBgQCibeWKcLnuD385oSX2\\nFHEWVpksFgoUafadg1231nhhHSJK4K+eqPyoOcKQwjFJMBRSfN9Bg+6/5ZcJ6UotLjze\\n8ER0t30p3uGF5evr6+3yua7bFiYwghKt7GsE7gok1tpZeDZZE2k1DTkT3OnZiQ75\\n5l+c+E8LDes63lfeM0l8gpXmJQ==\\n-----END PRIVATE KEY-----\\n\",
\"client_email\": \"cops-admin-nonprod-77X9-1@sis-Yam-prod-7X1y.iam.gserviceaccount.com\",
\"client_id\": \"1012312321321313122\",
\"auth_uri\": \"
https://accounts.google.com/o/oauth2/auth\"
,
\"token_uri\": \"
https://oauth2.googleapis.com/token\"
,
\"auth_provider_x509_cert_url\": \"
https://www.googleapis.com/oauth2/v1/certs\"
,
\"client_x509_cert_url\": \"
https://www.googleapis.com/demo/v1/metadata/x509/cops-admin-nonprod-11235-1%40sis-Yam-prod-4X7y.iam...."
,
\"universe_domain\": \"googleapis.com\"
}
"

 

Please sorted out secret key.!!!

 

Regards,

Shubham Verma

Ceasar
Tera Contributor

Same error with me. I don't see the steps you're describing in the Cloud service account form:

  1. Enter the GCP project ID in the "Project ID" field.
  2. Enter the GCP discovery Folder ID in the "Folder ID" field.