Philipp Ott - 2025-02-03

Hi all,

I hope this is the appropriate forum to post this kind of question. I was really excited about trying out the MS Intune Data collector extension that has recently been released, however I have been unable to configure it properly.

My current config in params.local.xml:

<?xml version="1.0" encoding="UTF-8"?><!-- Default values for parameters. Do NOT alter this file, use
params.local.xml instead -->
<parameters>
        <console_log_level>7</console_log_level>
        <!-- iTop parameters -->
        <itop_url>https://support.upits.at</itop_url>
        <itop_login>intunecollector</itop_login>
        <itop_password>redacted</itop_password>

        <!-- Client's credentials -->
        <ms_clientid>redacted</ms_clientid>
        <ms_clientsecret>redacted</ms_clientsecret>
        <ms_tenantid>redacted</ms_tenantid>
        <ms_tenantid_short>redacted</ms_tenantid_short>

        <itopmodelintunecollector>
                <jsonfile>data/InTuneManagedDevices.json</jsonfile>
                <path>value</path>
                <fields>
                        <primary_key>manufacturer</primary_key>
                        <brand_id>manufacturer</brand_id>
                        <name>model</name>
                        <type>operatingSystem</type>
                </fields>
                <osfamily_type_default_mapping>
                        <Android>Tablet</Android>
                        <iOS>MobilePhone</iOS>
                        <iPadOS>Tablet</iPadOS>
                        <Linux>PC</Linux>
                        <macOS>PC</macOS>
                        <Windows>PC</Windows>
                        <Chrome_OS>PC</Chrome_OS>
                </osfamily_type_default_mapping>
        </itopmodelintunecollector>

        <!-- Class collection sequence -->
        <collectors_launch_sequence type="array">
                <!-- iTop Brands -->
                <collector>
                        <name>iTopBrandInTuneCollector</name>
                        <enable>yes</enable>
                        <rank>1</rank>
                </collector>
                <!-- iTop Models -->
                <collector>
                        <name>iTopModelInTuneCollector</name>
                        <enable>yes</enable>
                        <rank>2</rank>
                </collector>
                <!-- iTop OS Families -->
                <collector>
                        <name>iTopOSFamilyInTuneCollector</name>
                        <enable>no</enable>
                        <rank>3</rank>
                </collector>
                <!-- iTop OS Versions -->
                <collector>
                        <name>iTopOSVersionInTuneCollector</name>
                        <enable>no</enable>
                        <rank>4</rank>
                </collector>
                <!-- iTop Mobile Phones -->
                <collector>
                        <name>iTopMobilePhoneInTuneCollector</name>
                        <enable>no</enable>
                        <rank>5</rank>
                </collector>
                <!-- iTop PCs -->
                <collector>
                        <name>iTopPCInTuneCollector</name>
                        <enable>no</enable>
                        <rank>6</rank>
                </collector>
                <!-- iTop Tablets -->
                <collector>
                        <name>iTopTabletInTuneCollector</name>
                        <enable>yes</enable>
                        <rank>7</rank>
                </collector>
        </collectors_launch_sequence>

        <!-- Global iTop parameters -->
        <model_unknown_type>InTuneUnknown</model_unknown_type>

        <!-- Synchronization parameters -->
        <contact_to_notify>philipp.ott@lavu.at</contact_to_notify>
        <synchro_user>intunecollector</synchro_user>
        <name_prefix>
                InTune</name_prefix>
        <name_postfix>Discovery</name_postfix>
        <json_placeholders>
                <itopbrand_synchro_name>$name_prefix$ Brands $name_postfix$ - $ms_tenantid_short$</itopbrand_synchro_name>
                <itopmodel_synchro_name>$name_prefix$ Models $name_postfix$ - $ms_tenantid_short$</itopmodel_synchro_name>
                <itoposfamily_synchro_name>$name_prefix$ OS Families $name_postfix$ -
                        $ms_tenantid_short$</itoposfamily_synchro_name>
                <itoposversion_synchro_name>$name_prefix$ OS Versions $name_postfix$ -
                        $ms_tenantid_short$</itoposversion_synchro_name>
                <itopmobilephone_synchro_name>$name_prefix$ Mobile Phones $name_postfix$ -
                        $ms_tenantid_short$</itopmobilephone_synchro_name>
                <itoppc_synchro_name>$name_prefix$ PCs $name_postfix$ - $ms_tenantid_short$</itoppc_synchro_name>
                <itoptablet_synchro_name>$name_prefix$ Tablets $name_postfix$ - $ms_tenantid_short$</itoptablet_synchro_name>
                <synchro_status>production</synchro_status>
                <full_load_interval>0</full_load_interval><!-- 7 days (in seconds): 7*24*60*60 -->
                <!-- Set the following parameters to 1 if you want to update them, to 0 otherwise -->
                <update_mobilephone_contacts_list>0</update_mobilephone_contacts_list>
                <update_pc_contacts_list>0</update_pc_contacts_list>
                <update_tablet_organization>0</update_tablet_organization>
        </json_placeholders>

        <curl_options>
                <CURLOPT_SSLVERSION>CURL_SSLVERSION_TLSv1</CURLOPT_SSLVERSION>
                <CURLOPT_SSL_VERIFYHOST>0</CURLOPT_SSL_VERIFYHOST>
                <CURLOPT_SSL_VERIFYPEER>0</CURLOPT_SSL_VERIFYPEER>
        </curl_options>

</parameters> 

I have tried with a customized version fitting our needs and this barebones versions from the documentation, but I always get an error regarding the datasource creation:

PHP Warning:  Trying to access array offset on value of type null in /var/www/html/data/production-modules/combodo-intune-data-collector/core/collector.class.inc.php on line 445
[2025-02-03 14:25:17]   [Debug] Checking the configuration of the data source ''...
PHP Warning:  Trying to access array offset on value of type null in /var/www/html/data/production-modules/combodo-intune-data-collector/core/collector.class.inc.php on line 448
PHP Warning:  Trying to access array offset on value of type null in /var/www/html/data/production-modules/combodo-intune-data-collector/core/collector.class.inc.php on line 463
PHP Warning:  Trying to access array offset on value of type null in /var/www/html/data/production-modules/combodo-intune-data-collector/core/collector.class.inc.php on line 469
[2025-02-03 14:25:17]   [Debug] The configuration of the data source '' looks correct.
PHP Warning:  Trying to access array offset on value of type null in /var/www/html/data/production-modules/combodo-intune-data-collector/core/collector.class.inc.php on line 479
[2025-02-03 14:25:17]   [Info]  There is no Synchro Data Source named '' in iTop. Let's create it.
PHP Warning:  Trying to access array offset on value of type null in /var/www/html/data/production-modules/combodo-intune-data-collector/core/collector.class.inc.php on line 834
PHP Warning:  Trying to access array offset on value of type null in /var/www/html/data/production-modules/combodo-intune-data-collector/core/collector.class.inc.php on line 848
[2025-02-03 14:25:17]   [Error] Failed to create the SynchroDataSource ''. Reason: Error: Missing parameter 'fields' (100)

Any help is appreciated
Regards~
Phil