MS Intune connector next page

Anyone know how to get all results using the ms intune connector? Trying to "List Managed Devices" and can't get to the next page after the first 500 results.  I've tried the $top and skip with no luck.

Tags iPaaS connectors
Asked by Matt Madill on Thu 2/22/24 11:03 AM
Sign In to leave feedback or contribute an answer

Answer (1)

This answer has been marked as the accepted answer
Michael Ligouri Wed 2/28/24 12:07 PM

Hi Matt, 

Looking at Microsoft's API documentation for this endpoint, I'm not seeing anything specified relating to paging.

https://learn.microsoft.com/en-us/graph/api/intune-devices-manageddevice-list?view=graph-rest-1.0&tabs=http

I did find another page though that talks about using PowerShell to export a .csv listing of managed devices.

https://www.paddymaddy.com/using-powershell-to-get-a-list-of-devices-from-microsoft-intune/

If this is an option for you, you could then use the Delimited File connector to parse that CSV file, or this is the logic I typically use for parsing CSVs:

  1. Replace new line characters with carriage return characters (to get the ↲, hold Shift and press Enter)
  2. Create a list of the rows, splitting on the ↲.  This give a list of the individual lines in the CSV.
  3. Make start/end properties with Start = 2 (to account for the header row) and End = length of the list created in Step 2.
  4. From Start to End, make another list of each row by splitting on the delimiting character (also replace quotation marks with empty string)

Uploaded Image (Thumbnail)

From there, you can reference specific columns in the row by their index values.

In any case, I will forward this to our other iPaaS resources for further input.

- Mike

No feedback
Hi Matt, our iPaaS team was actually already looking at this as I was typing my response. The connector has been updated. List Managed Devices now has @odata.nextLink in the response data model. You should be able to use regex to extract the skiptoken from @odata.nextLink, then use the skip token in the skiptoken query parameter that has been added to List Managed Devices. - Michael Ligouri Wed 2/28/24 12:13 PM