Cant connect from windows powershell to director selfservice api

Hi together,

we try to connect from windows 10 client as agent via Powershell to connect to selfservice api but each try leads in “Failed to connect to your Icinga Director at . Please try again.”

Trying Powershell script:
Get-IcingaDirectorSelfServiceConfig -DirectorUrl <our url/icingaweb2/director/ -ApiKey

leads to

ConvertFrom-Json : Ungültiger JSON-Primitiv.

So what i am doing from? In the icinga debug log we cannot see any error messages matching this topic. Is there any way to see what kind of error this could be?
Has this something to do with the CN Name in the certificate? Our CN Name is CN=Icinga2

  • Director version (System - About): 1.9.1
  • Icinga Web 2 version and modules (System - About): 2.11.2
  • Icinga 2 version (icinga2 --version): r2.13.6-1
  • Operating System and version: Debian 11
  • Webserver, PHP versions:Apache, PHP 8.1

regards

I am one step further with “Read-IcingaAgentLogfile” in Powershell on my Windows 10 notebook:

[11/20/2022 14:05:46] information/ApiListener: Reconnecting to endpoint ‘icingamaster’ via host ‘my_url’ and port ‘5665’
[11/20/2022 14:05:46] warning/ApiListener: Unexpected certificate common name while connecting to endpoint ‘icingamaster’: got ‘Icinga2’
[11/20/2022 14:05:46] information/ApiListener: Finished reconnecting to endpoint ‘icingamaster’ via host ‘my_url’ and port ‘5665’

So here we have some issue with the icinga certificate. Any hints to try to reissue the certificate?