
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2021 05:03 AM
Hello Experts,
We have installed SG-Intune integration using OOB procedures and it worked fine, but then we deleted the CIs that were imported by SG-Intune to test the identification engine, and these CIs deleted their Software Installations as expected.
After that, we started the Intune import using the OOB scheduled imports and it imported the CIs correctly but not the softwares . The software was imported into the staging table but was not inserted into the Software Installations table.
We see the error as "Invalid IRE payload" and all the software's are "skipped" state in the staging table.
Any help is highly appreciated.
Below are the screenshots for reference.
Thanks,
Raj
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2022 03:17 PM
Hi Raj,
If the computer CIs are deleted, the corresponding records created in sys_object_source for the computer records may not have been cleaned out. It will still exist with invalid target sysids. During Intune software processing, it does a lookup for the computer name based on the sys_object_source entry matching on the source native key for the computer/device. It probably picks up a target computer record with an invalid sysid(deleted computers). IRE team has a scheduled job to clean up the invalid sys_object_source entries so it does not exist in the first place. I think the window it keeps the record, even if it is invalid, is still 90 days. IRE made a change recently to remove the 90 days threshold for invalid records and it is fixed in SD or upcoming release I want to say. We are also fixing this issue in the Intune Integration.
Until then, do this as a work around:
Run this test script and see how many computer records that are currently invalid and you can easily modify this script to delete those invalid records from sys_object_source. Again, not sure how many you have and the volume of your sys_object_source. Highly recommend that you test this first in your dev/uat environment prior to implementing this in Prod.
------------------
// List a count of invalid sys_object_source records for a source/feed
var emptyRecords = 0;
start();
function start() {
var gr = new GlideRecord("sys_object_source");
gr.addQuery("name=SG-Intune^source_feed=SG-Intune Computers^last_scan<javascript:gs.endOfToday()");
gr.query();
while (gr.next()) {
var grTargetTable = new GlideRecord(gr.getValue("target_table"));
if (!grTargetTable.get(gr.getValue("target_sys_id"))) {
// Target Computer CI record does not exist. We need to delete this invalid sys_object_source record.
emptyRecords++;
//gs.info("Empty Sysid record = "+gr.sys_id);
}
}
}
gs.info('Empty Records: '+emptyRecords);
------------------
Do the same for SG-Intune Device feed if mobile devices were deleted as well. Basic idea is to clean up the sys_object_source entries that may have reference to an invalid target sys_id of a device/computer.
After the cleanup, run your software and see if it fixes your issue.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-13-2022 06:31 AM
Hi Palani,
Thank you very much for the response and detailed explanation.
We have the execute the the script provided by and can confirm the records were '0'.
*** Script: Empty Records: 0
We also don't have skipped import rows.
Thanks,
Raj

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2022 07:49 AM
Hi Palani,
Followed the steps which you suggested. so far, we did not see any skipped records. And it looks like the cleanup activity helped us.
Thank you for the solution.
Thanks,
Raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2022 10:47 AM
Hello Raj,
Today I encountered this issue and found in the sys_object_source table it showed that source feed for SG-Intune Computer is missing and showed "(empty)" instead
I also ran the script provided by Palani and it also retrieved "Script: Empty Records: 0" for SG-Intune Devices. How did solve yours or what should I do?
Thanks,
Hao