Error: "Invalid IRE payload" for Software's in SG-Intune integration using OOTB

Raj_Esh
Kilo Sage
Kilo Sage

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.

find_real_file.png

find_real_file.png

Thanks,

Raj

--Raj
1 ACCEPTED SOLUTION

Palani Chockali
ServiceNow Employee
ServiceNow Employee

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.

View solution in original post

7 REPLIES 7

Palani Chockali
ServiceNow Employee
ServiceNow Employee

Hi Raj,

Please open up a case task so someone from the Integrations team can hop on and take a look to see what the issue could be.

Hi Palani,

we have already raised a support case for the issue, I was wondering if anyone has faced such issue before.

Thank you for the input. 🙂 

 

Thanks,

Raj

--Raj

Raj_Esh
Kilo Sage
Kilo Sage

Brining up the thread.

Wondering if anyone has came across such issues with "Invalid IRE payload" 

 

Thanks,

Raj

--Raj

Palani Chockali
ServiceNow Employee
ServiceNow Employee

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.