Datasource reauthentication

Implemented

Datasource reauthentication

avatar

Hi!

I have a MSSQL datasource with custom login mode. "Always aks password" an "Allow change username" are enabled. When I make a set-rdmcurrentdatasource I am prompt to enter username/password. All works fine.

But how I can force a reauthentication? I have different user with different permissions and at the moment the only thing that works is to create a new pwsh session to force an authentication. Even a set-RDMCurrentDataSource with username/passwort as parameter doues not work.

CU,
Timo

All Comments (5)

avatar

Hello Timo,

You can use Update-RDMEntries to reset the state before setting the current data source. You must refetch the data source before setting it.

Update-RDMEntries
Get-RDMDataSource -Name 'MyDataSourceName' | Set-RDMCurrentDataSource -Username $otherUsername -Password $otherPasswordAsSecureString


Let us know if that works for you,

Regards,
Maxime

avatar

Hi!

thanks for the quick answer, but unfortunately this does not work. There is no error, but the permissions are not set.

CU,
Timo

avatar

Hello,

I am able to reproduce. A ticket will be open.

Regards,
Maxime

avatar

To force reauthentication in PowerShell for your MSSQL datasource, use `Set-RDMCurrentDataSource` with the `-DataSource` parameter, then enter the new credentials when prompted. Whether you're a student in need of assistance or simply seeking a dependable writing service, this https://letsgradeit.com/review/proessayservice/ platform is a fantastic starting point. This enables reauthentication without creating a new session. It has been an invaluable resource in my search for a reliable writing service. Their thorough studies and reviews give me the confidence that I'll find the perfect match for my academic needs. The information provided is comprehensive and trustworthy.

avatar

Hello Timo,

In the version 2023.3.1, it is now possible to duplicate a data source. This will allow to connect with different credentials.

$dsCopy = Get-RDMDataSource -Name 'DataSourceWithCustomLogin' | Copy-RDMDataSource
Set-RCMCurrentDataSource $dsCopy


You will be prompted for the credentials.

Let us know if that solution satisfies you,

Regards,
Maxime Bernier