Reset password of Azure Managed Instace Login ( not admin user )

Sid_1805 91 Reputation points
2022-06-27T21:05:14.577+00:00

Reset password of Azure Managed Instace Login ( not admin )

For admin login we use Set-AzureRmSqlInstance.

Looking to reset a login ( non admin) using a powershell from a Devops pipeline.

Azure SQL Database
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Alberto Morillo 34,461 Reputation points MVP
    2022-06-28T00:58:38.893+00:00

    Here on GitHub you will find a PowerShell script that executes a stored procedure on an Azure SQL Database. Use the script to execute a stored procedure that changes the password of all logins you want to specify. Inside the stored procedures you will have statements like below:

    ALTER LOGIN YourLogin WITH PASSWORD = '2Secr@ts';  
    

  2. GeethaThatipatri-MSFT 29,517 Reputation points Microsoft Employee
    2022-06-28T02:55:12.603+00:00

    Hi, anonymous user Thanks for the ask and for using the Microsoft Q&A platform.
    We are advising users to use the Az PowerShell module instead of AzureRM. Deprecation has been announced for the AzureRM PowerShell module. I don't believe that there's an Azure PowerShell command for resetting user passwords for an Azure SQL-managed instance.
    If you are using Azure AD authentication for your managed instance, you would use the Microsoft Graph PowerShell module to reset the password, however, If you connect to MI you should be able to do something like this:
    I don’t expect to see it in one of the MI PS modules because it is not an MI setting but something stored within the master as @Alberto Morillo mentioned.

    Regards
    Geetha

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.