I try to retrieve Data from the Microsoft Intune MDM using OData. The OData FME Reader only supports Basic and NTLM Authentication thought and dhe OData REST API only supports OAuth so I had to resort to the HTTPCaller.
This is similar to this Question
I created a new Web-Service from the "Microsoft Azure Active Directory (Template)" template and extended the API Permissions in the Azure Portal for the Client App with the get_data_warehouse Permission. I already created it for the "Microsoft SharePoint Online" Web-Service (which works fine using the SharePoint Lists Reader).
Authentication URL:
https://api.manage.microsoft.com/get_data_warehouse" alt="https://login.microsoftonline.com/e0aedced-9266-403b-b320-a41XXXXXXX/oauth2/v2.0/authorize?scope=https://api.manage.microsoft.com/get_data_warehouse" target="_blank">https://login.microsoftonline.com/e0aedced-9266-403b-b320-a41XXXXXXX/oauth2/v2.0/authorize?scope=https://api.manage.microsoft.com/get_data_warehouse offline_access&response_type=code&prompt=consent
I then Authorized the Web-Service and added a new WebConnection for it which I set in the HTTPCaller.
I still can't get the GET OData REST request to work, only 401 gets returned.
Recjected Output:
{"ErrorCode":"Forbidden","Message":"{\r\n \"_version\": 3,\r\n \"Message\": \"An error has occurred - Operation ID (for customer support): 00000000-0000-0000-0000-000000000000 - Activity ID: c3c44206-023e-4f79-aa82-0ef1fbb51456 - Url: https://fef.msub03.manage.microsoft.com/ReportingService/DataWarehouseFEService/devices?api-version=beta\",\r\n \"CustomApiErrorPhrase\": \"\",\r\n \"RetryAfter\": null,\r\n \"ErrorSourceService\": \"\",\r\n \"HttpHeaders\": \"{\\\"WWW-Authenticate\\\":\\\"Bearer realm=\\\\\\\"urn:intune:service,b0ab6c73-f703-4a4e-85e4-58016453cfa7,f0f3c450-59bf-4f0d-b1b2-0ef84ddfe3c7\\\\\\\"\\\"}\"\r\n}","Target":null,"Details":null,"InnerError":null,"InstanceAnnotations":,]}
All Help is greatly appreciated, I tried for hours now
Microsoft Intune Data Warehouse-API Documentation: