From efbe71070e8f75a4216298e81aec8d018368b5b3 Mon Sep 17 00:00:00 2001 From: Stefan Hubertus Date: Tue, 27 Jan 2026 08:45:07 +0100 Subject: [PATCH] Add environment switch for API token test Before the token can be tested, we need to explicitly change the environment. As there was no save to the configuration, this was forgotten at first and is now added. --- TeamViewerADConnector/Internal/GraphicalUserInterface.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/TeamViewerADConnector/Internal/GraphicalUserInterface.ps1 b/TeamViewerADConnector/Internal/GraphicalUserInterface.ps1 index 665d238..77dc31c 100644 --- a/TeamViewerADConnector/Internal/GraphicalUserInterface.ps1 +++ b/TeamViewerADConnector/Internal/GraphicalUserInterface.ps1 @@ -244,6 +244,7 @@ function Invoke-GraphicalUserInterfaceConfiguration($configuration, [string] $cu # Click Handler Button "Test Token" $mainWindow.FindName('BtnTestToken').Add_Click( { try { + Set-WebUriForEnvironment $mainWindow.DataContext.ConfigurationData $tokenValid = (Invoke-TeamViewerPing -ApiToken (ConvertTo-SecureString $mainWindow.DataContext.ConfigurationData.ApiToken -AsPlainText -Force)) } catch {