# Change user password through PC-SDK

**URL:** <https://tech-community.robotics.abb.com/t/change-user-password-through-pc-sdk/6452>\
**Category:** Developer Tools\
**Created:** [January 14, 2015, 3:35pm UTC](https://tech-community.robotics.abb.com/t/change-user-password-through-pc-sdk/6452 "2015-01-14T15:35:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrogerf](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@mrogerf](https://tech-community.robotics.abb.com/u/mrogerf)\
**Post date:** [January 14, 2015, 3:35pm UTC](https://tech-community.robotics.abb.com/t/change-user-password-through-pc-sdk/6452/1 "2015-01-14T15:35:08Z")

</div>

Hello.

I would like to change user password though pc-sdk. I checked at reference, but I didn’t succeced … class userinfo has a password property, but I got a exception when I try to change its value. Besides the method DemandWriteAccess cannot be called. I’m using PC-SDK 5.15

Any clue?

---

<div class="post-metadata">

**Author:** ![Armandb](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@Armandb](https://tech-community.robotics.abb.com/u/Armandb)\
**Post date:** [February 25, 2015, 11:17am UTC](https://tech-community.robotics.abb.com/t/change-user-password-through-pc-sdk/6452/2 "2015-02-25T11:17:47Z")

</div>

Hi MrRogerf,

I think you should to do a Request Mastership from controller to modify the password.

1. [C#](http://developercenter.robotstudio.com/BlobProxy/devcenter/RobotStudio/html/28540cbf-22f1-4c3c-acc7-733b806c82f7.htm#)  
VB  
C++  
F#

---

<div class="post-metadata">

**Author:** ![mrogerf](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@mrogerf](https://tech-community.robotics.abb.com/u/mrogerf)\
**Post date:** [March 13, 2015, 2:13pm UTC](https://tech-community.robotics.abb.com/t/change-user-password-through-pc-sdk/6452/3 "2015-03-13T14:13:45Z")

</div>

Thanks, ArmanDb, but I haven’t success so far . I still got an Exception when I try to set user.password. I also tried controller.Configuration instead of controller.Rapid. Part of my code is bellow:

…  
if (controllerInfo.Availability == Availability.Available)  
{ Controller controller = ControllerFactory.CreateFrom(controllerInfo);

UserInfo user = new UserInfo(“MyFullAccessUser”,“MyPassword”);

controller.Logon(user);

if (controller.CurrentUser.Name == “MyFullAccessUser”)  
{  
using (ABB.Robotics.Controllers.Mastership m = ABB.Robotics.Controllers.Mastership.Request(controller.Rapid))  
{  
if (m.IsMaster)  
{ System.Console.WriteLine(“I’m the master”);

controller.CurrentUser.Password =“teste”; //unhandled exception  
}  
else  
System.Console.WriteLine(“Ops … failed mastership”);  
}

…
