Skip to content

Reset your own password through Azure CLI #20956

@vladbresan

Description

@vladbresan

Hello,

As part of our project, we would like to reset the password of the logged-in account in an Azure DevOps pipeline.
The logged-in account does not have azure ad user administration privileges and we would not want to grant it that permission.
Is there a way of resetting your own password using Azure CLI?

ex:
az login -u "exampleUser@exampleDomain.com" -p "VerySecurePassword567"
$objectId = az ad user show --id "exampleUser@exampleDomain.com" --query "objectId" --output tsv
az ad user update --id $objectId --password "AnotherSecurePassword234" --force-change-password-next-login false

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions