logo

NJP

Integrate with Microsoft Intune - Scheduled Data Load

Import · Dec 14, 2021 · article

| < Previous Article | | Next Article > |
| -------------------------------------------------------------------------------------------------------- | | ------------------------------------------------------------------------------------------ |
| Mapping data with RTE/IRE | | Closing Off |

Now that we have a working retrieval and transformation process for our Intune data, we can schedule this data to auto-load at regular intervals

Scheduled Data Import (IntegrationHub Data Retrieval)

Continuing on with the low-code approach to data retrieval via ServiceNow, we can setup the data stream process of retrieving data via a single schedule record.

  • Via the application navigator search for scheduled imports and create a new record
  • Set a name such as Microsoft Intune Computing
  • Select the data source you created as part of the data retrieval article
  • Select how often you wish data to bring in data (I recommend daily)
  • Save the record and ensure it is active
  • You're done!

Scheduled Data Import (Scripted Data Retrieval)

  • Via the application navigator search for scheduled jobs and use the option under system definitions
  • Create a new record and from the interceptor select Automatically run a script of your choosing
  • Set the name, run frequency and time you wish
  • Use the script below, ensuring the import table name, data source name and method match that of what you created
var utils = new IntuneUtils("u_intune_computer_device_imp" , 
       "Intune Computer Device Imp" , 
       "GET Computing Devices" , 
       "deviceType eq 'desktop' or deviceType eq 'macMDM' or deviceType eq 'winEmbedded' or deviceType eq 'surfaceHub' or deviceType eq 'windowsRT'");

utils.run();

Labels:

image

View original source

https://www.servicenow.com/community/developer-articles/integrate-with-microsoft-intune-scheduled-data-load/ta-p/2312250