API Error P1022 When Initiating Specific GCP Project Scan

API Error P1022 When Initiating Specific GCP Project Scan

93
Created On 11/10/26 10:59 AM - Last Modified 11/10/26 15:53 PM


Symptom


When initiating a targeted or specific scan for a Google Cloud Platform (GCP) project via the Secure Cloud Access (SCA) API, the request fails with error code P1022

API details :

POST  https://{tenant_name}.sca.cyberark.cloud/api/cloud/rescan 

Payload:

{
  "cloudProvider": 1,
  "accountType": "Specific",
  "entityIds": [
    {
      "org_id": "<GCP or AWS or Azure Org Id's>",
      "account_id": "<Project or Account Id or Subscription>"
    }
  ]
}


https://api-docs.cyberark.com/sca-api/docs/secure-cloud-access-apis#/Cloud%20scan/initiate-scan



Environment


Secure Cloud Access (SCA) API

Applies to all supported cloud providers (AWS, Azure, and GCP).



Cause


  • A "Specific" scan can only target projects that were previously discovered during a full ("All") scan

  • If an invalid, dummy, or previously undiscovered project ID is supplied in the request payload, the system cannot locate any prior scan record for that project. Because the system has no indexed record of the project existing under the organization, the API correctly rejects the request with response P1022. This is expected behavior and not a backend service defect.



Resolution


  • Ensure the project ID in the API request payload exactly matches a real, active project in the target GCP organization.

  • If the project was recently added to GCP, allow the scheduled full ("All") scan to run and complete, or trigger a full scan manually.

  • Confirm that the full scan completed successfully using the scan status API before calling a specific scan for that project.



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000000s8XCAQ&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail