Special_azure discrepancy between Checkmk GUI and the CLI

The CLI debug seems to indicate a successful connection and initially the host showed 19 monitored services but they quickly became vanished services.

Check_MK version 2.2.0p11 CRE
Ubuntu 22.04

> Graph client: /6888888-0f2a-412345678912334545/oauth2/token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff78b5d5750>: Failed to establish a new connection: [Errno -2] Name or service not known'))**CRIT** , Management client: /6888888-0f2a-412345678912334545/oauth2/token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff78ad6e090>: Failed to establish a new connection: [Errno -2] Name or service not known'))**CRIT** , Warnings: 0, Exceptions: 0

“cmk --debug -vvII Azure-Host”

> SUCCESS - Found no host labels
> + ANALYSE DISCOVERED SERVICES
> + EXECUTING DISCOVERY PLUGINS (4)
>   Trying discovery with: azure_ad_sync, azure_app_registration, azure_agent_info, azure_ad
>   1 azure_ad
>   1 azure_ad_sync
>   1 azure_agent_info
>  16 azure_app_registration
> SUCCESS - Found 19 services

Originally I was getting a permissions issue with graph so I added the permissions as per
https://checkmk.atlassian.net/wiki/spaces/KB/pages/9472358/Monitoring+Microsoft+Azure±+Graph+client+Insufficient+privileges+to+complete+the+operation?src=search

AD Sync Account-xxxxxx Time since last synchronization: 29 minutes 29 seconds
AD Users             87 User Accounts
Azure Agent Info     Remaining API reads: 11998, Monitored groups: AZURE-S2S-xxx, Azure-s2s-xxx, AzureBackupRG_uksouth_1, DefaultResourcexxxxxK, DefaultResourceGroup-WUK, GB-AZURE-xxx-01_GROUP, KeyVaults, LogAnalyticscccccccurces, cccccccccxxxx, xxx-Sxxxx-ring, xxx-compliance-xxxxx, cloud-shxxxxxx-northeurope, gb-azure-xxx-01_group, Warnings: 0, Exceptions: 0, 1 additional detail available
Azure/App Registration Secret xxxxxx_Staff_Access - Q1dBUF9xxxxxx2VjcmV0 Remaining time: 309 days 21 hours
Azure/App Registration Secret xxxxxx_Staff_Access - Q1dBUFxxxxxoU2VjcmV0 Remaining time: 105 days 4 hours
Azure/App Registration Secret xxxxxx_Tenant_Access - Q1dBxxxxxxx2VjcmV0 Secret expired: 187 days 21 hours ago
Azure/App Registration Secret xxxx-Azure-Health-RO - xxxxx-Azure-Health-Key Remaining time: 1 year 152 days
Azure/App Registration Secret xxxxxxxx-Subscription-App - xxxxxxx_23 Secret expired: 22 days 0 hours ago
Azure/App Registration Secret Cxxxxx-201029-Subscription-App - cxxxxxx2022_key Secret expired: 145 days 2 hours ago
Azure/App Registration Secret xxxxxx_Tenant_Access - Q1dBUF9BdXRoU2VjcmV0 Secret expired: 216 days 1 hour ago
Azure/App Registration Secret xxxxxxcription-App - xxxxx_23 Secret expired: 22 days 0 hours ago
Azure/App Registration Secret Pxxxxxxscription-App - xxxx_key Secret expired: 145 days 2 hours ago
Azure/App Registration Secret Pxxxxx029-Subscription-App - xxxxx_new_key Secret expired: 114 days 20 hours ago
Azure/App Registration Secret xxxxx VPN - xxxxxProtect - test_secret Remaining time: 65 days 3 hours
Azure/App Registration Secret xxxx_ARK_BLUE - Q1dBUF9xxxxxU2VjcmV0 Remaining time: 342 days 2 hours
Azure/App Registration Secret xxxx_ARK_GREEN - Q1dBxxxxxx2VjcmV0 Remaining time: 342 days 2 hours
Azure/App Registration Secret xxxx_ARK_RED - Q1dBxxxxx2VjcmV0 Remaining time: 342 days 2 hours
Azure/App Registration Secret xxxxxx_Tenant_Access - xxxxx_AadAuth Remaining time: 1 year 8 days
Azure/App Registration Secret xxxxxx_Tenant_Access - Q1dBxxxxxxjcmV0 Remaining time: 38 days 8 hours
Azure/App Registration Secret xxxxx_Tenant_Access - Q1dBUxxxx2VjcmV0 Secret expired: 49 days 2 hours ago
Azure/App Registration Secret acpapi (do not delete) - xxxxxxx-10 Remaining time: 125 days 2 hours
Azure/App Registration Secret xxxx-sp - //5yAGIAxxxxxxAA Secret expired: 271 days 2 hours ago
No piggyback files for 'Azure-xxxxx_xxxxx'. Skip processing.
[cpu_tracking] Stop [73d1b5493110 - Snapshot(process=posix.times_result(user=0.010000000000000231, system=0.0, children_user=0.0, children_system=0.0, elapsed=0.019999999552965164))]
[special_azure] Success, [piggyback] Success (but no data found for this host), execution time 4.9 sec | execution_time=4.910 user_time=0.020 system_time=0.000 children_user_time=1.090 children_system_time=1.020 cmk_time_ds=2.770 cmk_time_agent=0.000

It looks like it works in the debug then services vanish…

Graph client: /6717186xxxxxxxxxxxxxx-b9bb2c70c58f/oauth2/token 
(Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 
0x70bb8a819750>: Failed to establish a new connection: [Errno -2] 
Name or service not known')) CRIT, Management client: /67171c70c58f/oauth2/token 
(Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 
0x70bb89fae2d0>: Failed to establish a new connection: [Errno -2] Name or service not
known'))CRIT, Warnings: 0, Exceptions: 0

Azure Monitoring require Azure AD P2? - General - Checkmk Community

Followed this recommendation in the link above but the issue with the services being discovered then quickly become vanished

Interestingly after applying the config suggested the error message has changed slightly

Graph client: /67171865-0f2a-4xxxxxxxxxxxx0c58f/oauth2/token 
(Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 
0xxxx0e61bec50>: Failed to establish a new connection: [Errno -2] 
Name or service not known'))CRIT, Warnings: 0, Exceptions: 0