cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Srinath
Helper III
Helper III

Generating random passwords in Power Apps

Hi,

 

Is there a way i can generate random passwords in power apps with out using flow. The password should be a string and should have alpha-numerical characters. 

 

Any help will be greatly appreciated.

 

Regards

Srinath

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User
Super User

@Srinath 

This code will produce a password of 8 characters in length containing a-z, 0-9.

 

Concat(FirstN(Shuffle(Split("abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789","")),8),Result)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

4 REPLIES 4
mdevaney
Super User
Super User

@Srinath 

This code will produce a password of 8 characters in length containing a-z, 0-9.

 

Concat(FirstN(Shuffle(Split("abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789","")),8),Result)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Hi @mdevaney ,

 

Thanks for the quick response.

 

Regards

Srinath

Super nice! How would you update what is in the label? 

Because I have put the code in text label and wish for it to refresh the code if I push a button? 

Is Result a variable? 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,912)