Forum Discussion

joship88's avatar
joship88
Copper Contributor
Jan 10, 2023

Which API are recommended to fetch data from Microsoft Intune?

Hi, I am trying to use the recent Intune APIs https://learn.microsoft.com/en-us/rest/api/intune/ .and have been running into an error which says,  {"error":{"code":"InvalidResourceType","message":"The resource type could not be found in the namespace 'Microsoft.Intune' for api version '2015-01-14-preview'."}}. 

My questions are - 

1. Are the available APIs good to use in production OR should I use Graph API equivalents, like these, https://learn.microsoft.com/en-us/graph/api/intune-devices-manageddevice-list?view=graph-rest-1.0 

2. Is there a better/latest Intune API version I should be looking forward to?

 

Please advice! Thanks.

2 Replies

  • Mr_Helaas's avatar
    Mr_Helaas
    Steel Contributor

    Hi joship88,

     

    To manage Intune via an API you should use the Graph API, you have an option to use v1.0 or BETA. Within the BETA you have all recent API available. 

     

    If you have any question about the Graph API please let me know. 

     

    Kind regards,

     

    René

  • The easiest way is to open developer options in Edge browser and navigate to “Network” tab. While you naviagte through Intune portal, you can observe the api calls in developer pane in Edge. Note down the api you want yo use for automation tasks and you are good to go.

    Best Regards,
    Somesh

Resources