web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to change the pass...
Power Apps
Unanswered

How to change the password of Contact records from Canvas App

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Experts,

 

I am having one Power Portal running and we are using Local Authentication. So, all the users who register them self are created in Contacts entity.

So, Basically I have one canvas app from where some other task is performed on Contacts Entity and wanted to add one more functionality i.e change the password of selected contact from the gallery.

How can I change the password of Contact from the canvas app? can we do that by calling automate flow or any script available by which we can change the password?

I can see Password Hash field in Contacts entity but if I update that field for a selected contact then that user is not able to log in from Portal and giving below error:
Password change issue from canvas appPassword change issue from canvas app

 

Please help me with this. Any help will be appreciable.

 

Thanks,

Amit

Categories:
I have the same question (0)
  • Joel CustomerEffective Profile Picture
    3,224 on at

    You cannot dirctly update the password hash and have it work. 

    See the same question asked by someone else: https://powerusers.microsoft.com/t5/Building-Power-Apps/How-to-Encrypt-and-decrypt-password-field-of-contact-entity/m-p/633529#M200893

     

    TL;DR you should not use local authentication--it is deprecated. But if you need to, you need to use a plugin to update it.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @jlindstrom 

    Thanks for your response!

    Where I have to include the plugin and even with the plugin I can't add the functionality in Canvas App?

     

    please help me to clear some doubts on the same.

    Thanks,

    Amit

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Do you want to update the password for the selected contact in a Gallery using canvas app?

     

    If you want to update the password for the selected contact in a Gallery using canvas app, I afraid that there is no way to achieve your needs.

     

    Actually, the password of a Contact record in your Portal would be hashed and stored in the adx_identity_passwordhash field on the Contact Entity. And Portal uses ASP.NET Identity (v2) for local authentication, and so leverages its default password hashing functionality.

    Please check the following article for more details:

    https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/283515/the-portal-user-s-password-encryption-type/811085

     

    So if you want to change the password for a selected Contact, you should convert your Text Password value into corresponding Hash value, then store it into your Contact Entity. But currently in PowerApps, there is no way to convert a Text value into a Hash value.

    If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

    https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas

     

    In addition, when you sign in Portal using your local authentication, it would convert the typed password into a Hash value firstly, then compare the Hash value with the stored Hash value in your Contact Entity, if matches, validate successfully, otherwise, validate fail.

     

    Best regards,

  • Joel CustomerEffective Profile Picture
    3,224 on at

    @Anonymous  My suggestion of a plug-in was to have another field located somewhere else like a custom entity, which you could create a record with the non hash value, then have a plugin update the password with the hash format

     

    @v-xida-msft is correct that you can’t directly update the password field, but if you can capture the value there are ways of having it converted to hashcode

     

    thatbis covered on my original link

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 316 Most Valuable Professional

#2
11manish Profile Picture

11manish 242

#3
Valantis Profile Picture

Valantis 198

Last 30 days Overall leaderboard