"Invalid username and password, please verify your credentials" when getting an RDM datasource
Using PowerShell RDM module 2021.2.0.43 on Windows Server 2019, I am trying to connect to our RDM server.
I am connected through the RDM application successfully, and my password and username are working fine.
Upon trying to run those commands,
$DS = Get-RDMDataSource -Name $DataSourceName
Update-RDMUI
Set-RDMCurrentDataSource -ID $ds.ID
Update-RDMUI
I receive three lines of error:
Invalid username or password, please verify your credentials
Invalid username or password, please verify your credentials
Invalid username or password, please verify your credentials
Get-RDMRepository returns the error:
WARNING: Your connection is not ready
I tried running them through PS 5.1 as well as 7.2.10, but the result is the same.
I presume I am doing something small wrong that prevents me from connecting.
Thank you in advance for your attention.
Hello,
What RDM version are you using?
What data source type are you connected to?
What authentication method are you using to connect on the data source? Is it with a domain account, a custom account?
Best regards,
Érica Poirier
Good morning, Erica, thanks for your reply.
RDM version Enterprise Edition 2021.2.29.0 64bit
The datasource is Devolution server.
We use Office365 authentication (Active Directory). The same user that I log in to the server is used to login to the Devolutions Server.
when I press Test connection I receive a successful connection response.
Cheers,
Lubo
Hello Lubo,
Thank you for your feedback.
If I remember correctly, DPS 2021.2 didn't have OAuth authentication yet so the only way to connect using PowerShell would be through an app key/password.
In your DPS web interface, go to Administration -> Applications.
Create a new app with proper vault access and group permissions.
Save the app id and secret.
In PowerShell, you'll need to associate your data source to the app like so
$ds = Get-RDMDataSource -Name 'Genetec DPS' Set-RDMDatasourceProperty $ds -Property 'ScriptingTenantID' -Value 'your app id' Set-RDMDatasourceProperty $ds -Property 'ScriptingApplicationPassword' -Value 'your app password' Set-RDMDataSource $ds Set-RDMCurrentDataSource $ds.ID
Let me know if this helps.
Best regards,
Érica Poirier
Hello Erica, thanks for detailed steps.
I created a new app and saved the application ID and the password string.
Executed all lines without any errors.
At the end I even ran Update-RDMUI.
Upon running the Get-RDMDatasource with my datasource name, it still reported it as not connected.
Get-RDMRepository returns "WARNING: Your connection is not ready"
What I noticed when I was setting the new App is that there was already one that was called with the name Genetec DPS, which I couldn't edit nor delete and it wasn't enabled.
Hence, I created a new App and called it Genetec_DPS.
Do you suspect that this underscore in the app name is the problem, or it is unrelated?
All the best,
Lubo
54f899a8-5269-4f6b-b533-8390a055b91a.png
fdf25e23-cf83-4725-be7b-c234b35c9968.png
Ha, it worked!!!!
I just re-run the Set-RDMCurrentDataSource $ds.ID and it worked!
Marvelous!
You are great! Thank you so much!
Cheers,
Lubo
Hi Lubo,
Thank you for your feedback and glad that you were able to get your script working.
It was a pleasure to assist you to solve this issue.
Best regards,
Érica Poirier