Users

All Posts (7)

avatar

krizman_eric

import user from file in RDM console

avatar
avatar
avatar
avatar
avatar

Richard,

Thank you, that did work. I noticed that I to select all the users in the list and then click the Fix SQL Login button in order to get them all to show up. Is that something that can be incorporated into the PowerShell function? If not, this isn't a huge deal but it should be something anyone who uses this should know about it. Thanks.

import user from file in RDM console

avatar
avatar
avatar
avatar
avatar

Just wanted to update this thread. I ran the powershell script in production and it was able to add over 200 users, which is great. However, upon testing with one of my colleagues, we noticed that he got a token error when trying to test the DB. I then removed his account and just recreated it and afterwards the user was able to connect successfully. He did not alter her username or password from the screen while I recreated his account.

Is there a way i can query the Azure DB to see if the user accounts were actually created or not? It seems the script only makes superficial changes and doesn't actually create a login for the users on the DB side. Please advise. Thanks.

import user from file in RDM console

avatar
avatar
avatar
avatar
avatar

Yes, that worked. Thank you! Documentation is so important :)

Are you planning on including an import feature instead of relying on this method? That would really solve all these complexities for future users.

At any rate, thank you for assisting me with this!

import user from file in RDM console

avatar
avatar
avatar
avatar
avatar

When using an Azure SQL, you cannot use an account with interactive authentication (0365) for the scripts. It is not supported with the new RDM module because the backend is not available in PowerShell Core. You would need to use a database user to be able to connect to the data source.

Thanks for the info. Can you explain to me how I would perform this as the DB user? I am not a SQL expert here so I might need some hand holding. Thanks.

import user from file in RDM console

avatar
avatar
avatar
avatar
avatar

Richard,

Thanks for updating this, however, i get the exact same error even with -SetUser at the end. I am running 2021.2.28.0 64-BIT and 2021.2.0.43 of the powershell module. I did want to mention that when I run get-rdmdatasource, i get this message about being unable to open the server. I am willing to bet this is my issue. Any thoughts on why this is happening and how to fix it?

I should mention that i had been running on .42 of the powershell module but just updated it to .43. That appears to have broken the switches for email and authentication type since they are no longer options:

import user from file in RDM console

avatar
avatar
avatar
avatar
avatar

I am guessing it doesn't work. Running this command: New-RDMUser -Login $Email -Email $Email -AuthenticationType AzureAD doesn't work. I get this error (i replaced the server name with domain so not to expose our tenant):

New-RDMUser : Cannot open server "domain" requested by the login. The login failed.

At line:1 char:20

+ ... $newUser = New-RDMUser -Login $Email -Email $Email -AuthenticationTy ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : NotSpecified: (:) [New-RDMUser], SqlException

+ FullyQualifiedErrorId : System.Data.SqlClient.SqlException,RemoteDesktopManager.PowerShellModule.NewRDMUserCommand

I am able to create users manually so this script is not passing my credentials when trying to create in Azure SQL. I guess this isn't supported?

import user from file in RDM console

avatar
avatar
avatar
avatar
avatar

Will this work if the DB is Azure SQL?

Also, is there any special formatting needed for the names of columns in the csv file?

Thanks

1 - 7 of 7 items