How To Change User Id And Password For Azure SQL Server Database

This Azure tutorial will discuss how to change user ID and password for Azure SQL Server Database using Azure Portal, PowerShell, and Azure CLI.

Approach-1: Using Azure Portal

Let’s discuss here the easiest way to change the user ID and password for the Azure SQL server database. But before that, you should have a little idea of What is Azure SQL Database?.

Assuming you have enough idea about Azure SQL Database by now. Let’s discuss the steps to reset the password for the Azure SQL Server Database.

  1. Log in to the Azure Portal (https://portal.azure.com/).
  2. Once you have logged in to the Azure Portal, search for SQL Server and click on the search result SQL Server.
Azure SQL Database Change User Password

3. On the SQL servers page, you can see the list of databases that you have created already. Click on the one for which one, you want to change the user ID and password.

How To Reset Azure SQL Server Password

4. On the overview tab of your SQL server database page, click on the Reset password button as highlighted below.

azure sql change user password

5. On the Reset admin password window, enter the new password and confirm the password, and then click on the Save button to update the password or click on the Discard button to discard the changes.

how to change azure sql server admin password

6. Once you click on the Save button, it will take a few seconds to update the new password, and then it will show you the message “Successfully reset administrator password.”

the parameter password cannot be provided for users that cannot authenticate in a database

Note: An important point to remember here is, the admin login name can’t be changed once it has been created. You can only able to change the password.

This is How To Change User ID and Password For Azure SQL Server Database.

Approach-2: Using PowerShell

You can also reset the password of your Azure SQL Server Database using PowerShell. Follow the below steps.

  1. Open the PowerShell ISE using Run as Administrator mode.
azure sql change user password

2. Now, run the Below PowerShell Script to reset the Password For your Azure SQL Server Database.

$pwd = ConvertTo-SecureString -AsPlainText -Force 'Raj@######'
Set-AzureRmSqlServer -ResourceGroupName Demo123 -ServerName test45 -SqlAdministratorPassword $pwd

Where, Demo123 is the Resource Group name, test45 is the Azure SQL Server Database name in my case. Make sure to change the resource group and database server name based on yours.

Once you run the above script, It will successfully reset your Azure SQL Server Database password and get the below Output.

ResourceGroupName        : Demo123
ServerName               : test45
Location                 : eastus
SqlAdministratorLogin    : rajkishore
SqlAdministratorPassword : 
ServerVersion            : 12.0
Tags                     : {}
Identity                 : 
FullyQualifiedDomainName : test45.database.windows.net
ResourceId               : /subscriptions/1cdf4300-dee5-4518-9c9c-feaa72a5cbd1/resourc
                           eGroups/Demo123/providers/Microsoft.Sql/servers/test45
MinimalTlsVersion        : 
PublicNetworkAccess      : Enabled

Check out this below