SG-Wiz: How to exclude Project ID using the Connection properties to prevent specific resources from being ingestedIssue <!-- /*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: ; } } Configuring Project ID exclusion in the SG Connector Wiz properties to prevent specific resources from being ingested.Related product documentation: https://www.servicenow.com/docs/r/servicenow-platform/service-graph-connectors/sgc-cmdb-wiz-props.html Symptoms<!-- /*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: ; } } If exclusion is not configured correctly even though you configured the related property, resources associated with the specific project ID will still be ingested in future runs of the SG Wiz integration Facts<!-- /*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: ; } } 1. If a resource is associated with multiple Project IDs do we need to exclude all Project IDs to stop it from being ingested in future runs of the integration? Answer - Yes. If a resource is associated with multiple Project IDs, all of the associated Project IDs must be configured in the exclusion property to ensure that the resource is completely excluded from ingestion.If only one Project ID is configured, the resource may still be imported through its other associated Project IDs. Therefore, to fully exclude the resource, all associated Project IDs must be included in the exclusion property. 2. Is there any limit on the number of Project IDs that can be configured in the SGC-Wiz exclusion properties?Answer - By default, the SGC-Wiz Project ID exclusion property has a maximum length of 4000 characters. This determines how many Project IDs can be configured in the property. If additional capacity is required, the maximum length of the property can be increased via the following steps: Step 1 – Open the table* Navigate to Service Graph Connection Properties (sn_cmdb_int_util_service_graph_connection_property).Step 2 – Open the table definition* Right-click any column header and select Configure > Table. This will open the Service Graph Connection Properties table record.Step 3 – Open the Dictionary Entry* On the Columns tab, locate the Value field and open its Dictionary Entry.Step 4 – Switch the application scope (if prompted)* If the Dictionary Entry opens in read-only mode, you may see a message indicating that the record belongs to the Integration Commons for CMDB application.* Click the provided here link to switch your application scope to Integration Commons for CMDB so that the record becomes editable.Step 5 – Update the maximum length* Modify the Max length field from the default value (for example, 4000) to the desired value.Step 6 – Save the changes* Click Update to save the Dictionary Entry. 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 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: ; } } If you have configured the Project ID Exclusion Property but you're still seeing resources associated with that Project ID being ingested, possible causes are: 1. Not all of the Project IDs related with the specific resource have been excluded 2. The Project IDs configured are using incorrect format 3. The Project IDs used are actually the "External ID" and not the real "Project ID". 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: ; } } Understanding the behavior the "Exclude Projects" property ----------------------------------------------------- - The "Exclude Projects" property works during ingestion, before data reaches the staging/import set tables. Its purpose is to prevent the connector from fetching resources whose projects are fully excluded. - It does not remove or modify records that already exist in the CMDB. Therefore, it's important to set the correct expectation: ----------------------------------------------------- - Exclude Projects prevents future ingestion/refresh. - It does not retroactively delete Cloud Service Accounts that have already been imported into the CMDB. - If a Cloud Service Account already exists in cmdb_ci_cloud_service_account, configuring project exclusion will simply prevent it from being fetched and refreshed during future runs. The existing CMDB record will remain. Recommended way to validate the exclusion (without deleting anything) Since exclusion occurs before staging, the staging/import set table is the correct place to validate the behavior. ----------------------------------------------------- 1. Confirm the subscription's project membership by checking all project IDs returned in graphEntity.projects[]. 2. Add every project ID associated with that subscription to the Exclude Projects property. * This is important: if even one project ID is missing from the exclusion list, the subscription will still be ingested through that remaining project. 3. Ensure the Projects (Include Projects) property is empty, since project exclusion only applies when no include list is configured. 4. Run SG-Wiz (either Test Load or the scheduled import). 5. Check the staging table sn_wiz_integ_sg_wiz_subscription (or the corresponding import set created by the data source) for the subscription name or subscriptionExternalId. * If the exclusion is working correctly, no new staging record will be created for that subscription. * This confirms that the connector did not fetch the resource. Additional confirmation (CMDB) ----------------------------------------------------- As an additional, non-destructive validation: * Note the existing Cloud Service Account's Updated (or last discovered) timestamp before running the import. * Run a full import. * Compare the timestamp afterward. If the exclusion is working correctly: * The excluded Cloud Service Account will not be updated (timestamp remains unchanged). * Non-excluded Cloud Service Accounts will be refreshed as expected. Important note ----------------------------------------------------- - If you goal is to remove Cloud Service Accounts that already exist in the CMDB, the Exclude Projects property is not designed for that purpose. - Its purpose is only to prevent future ingestion. Removing existing Cloud Service Account records (if any) is a separate cleanup/decommission activity.