Unable to connect to DVLS datasource

Implemented

Unable to connect to DVLS datasource

avatar

Devolutions Server v2022.3.8.0
RDM v2022.3.30.0 64-bit
RDM PS module v2022.3.1.2
PSCore v7.3.1

We find ourselves unable to connect to our DVLS datasource again. Assistance from the PS team would be appreciated.

We use MFA for our connections and started noticing we were getting double-prompted for MFA and after successfully logging in, we get a prompt to go into offline mode.

As a workaround, we have registered an app in DVLS and attempted to login using the code below with no success.

PS C:\> $dsname = "xxxxdevolpsrv01"
PS C:\> $dsurl = "https://xxxxdevolpsrv01.xxxxxxxxxx.net/dps"
PS C:\> $appkey = "d029a000-320f-xxxx-xxxx-xxxxxxxxxxxxx"
PS C:\> $appsecret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
PS C:\> $ds = New-RDMDataSource -DVLS -Name $dsname -Server $dsurl -ScriptingTenantID $appkey -ScriptingApplicationPassword $appsecret -SetDatasource
PS C:\> Set-RDMDataSource $ds
PS C:\> Get-RdmDataSource

ID          : 8076da6f-b328-4bcc-9831-df9661ab7176
IsConnected : False
IsOffline   : False
Name        : xxxxdevolpsrv01
Type        : RDMS

ID          : 450acbea-8be7-48e8-8392-aea66f094e22
IsConnected : True
IsOffline   : False
Name        : Local Data Source
Type        : SQLite


PS C:\> Get-RdmInstance

ApplicationVersion OptionFilename
------------------ --------------
2022.3.1.2         C:\Users\xxxxxxxx\AppData\Roaming\Devolutions\RemoteDesktopManager\RemoteDesktopManager.cfg

PS C:\> Get-RdmDiagnostic

Serial                        LicenseType IsLicenseValid IsLicenseExpired
------                        ----------- -------------- ----------------
xxxxx-xxxxx-xxxxx-xxxxx-xxxxx Enterprise            True            False

PS C:\> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.3.1
PSEdition                      Core
GitCommitId                    7.3.1
OS                             Microsoft Windows 10.0.17763
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

PS C:\> get-module -ListAvailable RemoteDesktopManager | select version

Version
-------
2022.3.1.2

PS C:\>

All Comments (4)

avatar

Hello Paul,

An issue was discovered in the two latest version of the RDM PowerShell module with a Devolutions Server data source, the engineering team is investigating the issue.

For now, can you uninstall the module:

Uninstall-Module -Name RemoteDesktopManager


Close PowerShell, and then install the version 2022.3.1.0:

Install-Module -Name RemoteDesktopManager -RequiredVersion 2022.3.1.0


The connexion should establish normally after.

Best regards,

Richard Boisvert

avatar

That fixed the MFA, thank you! The app creds still do not work.

PS C:\> $dsname = "xxxxdevolpsrv01app"
PS C:\> $ds = Get-RDMDataSource -Name $dsname
### I get an MFA prompt, which is unexpected, since we are asking it to get the datasource for the app cred datasource, not our interactive datasource
PS C:\> Set-RDMDataSource $ds
PS C:\> Get-RDMdataSource

ID          : 402d92ac-5db1-47d7-9b94-d5865611bb65
IsConnected : True
IsOffline   : False
Name        : xxxxdevlpsrv01
Type        : RDMS

ID          : dac85dbd-845f-482f-9f58-b723896e940d
IsConnected : False
IsOffline   : False
Name        : xxxxdevolpsrv01app
Type        : RDMS

avatar

Hi,

In your sample script, you never actually switch to your data source using the app key/password.
A call to Set-RDMDataSource $ds saves information to disk. To switch data source, Set-RDMCurrentDataSource is what you are looking for.

$dsname = "xxxxdevolpsrv01"
$dsurl = "https://xxxxdevolpsrv01.xxxxxxxxxx.net/dps"
$appkey = "d029a000-320f-xxxx-xxxx-xxxxxxxxxxxxx"
$appsecret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
$ds = New-RDMDataSource -DVLS -Name $dsname -Server $dsurl -ScriptingTenantID $appkey -ScriptingApplicationPassword $appsecret -SetDatasource
Set-RDMCurrentDataSource $ds


Let me know if this helps.
Regards

Jonathan Lafontaine

avatar

I should add.

To make sure our module registers correctly while using a app key/password, you should upgrade to 2022.3.1.1 at least.

Jonathan Lafontaine