The CreatorCon Call for Content is officially open! Get started here.

Random password generator that meets certain password policies

hanaphouse
Tera Guru

We are using the IntegrationHub Microsoft AD spoke to create certain user accounts, however, we have a hard time generating passwords in this action below:

How do I generate such a password that I can send over in a notification to a user? Can I set this up somewhere?

find_real_file.png

1 ACCEPTED SOLUTION

Hitoshi Ozawa
Giga Sage
Giga Sage

Hi Hanaphouse,

Create an Action that will generate and return a random password and drag the returned value to the field.

A. Action

1. Action Input

find_real_file.png

2. Script step

(function execute(inputs, outputs) {
    var pwdLength = inputs.length;
    var randomString = '';
    for (var i = 0; i < pwdLength; i++) {
        randomString = Math.random().toString(36).slice(-8);
    }
	outputs.password = randomString;
})(inputs, outputs);

find_real_file.png

3. Action Output

find_real_file.png

B. Sample execution flow (since I don't have AD Integration Hub). Instead of "Log", use the AD Integration Hub.

find_real_file.png

Execution result:

find_real_file.png

View solution in original post

4 REPLIES 4

Jon23
Mega Sage

The following should help you generate a suitable password:

Simple password generator

GlideEncrypter API

Hitoshi Ozawa
Giga Sage
Giga Sage

Hi Hanaphouse,

Create an Action that will generate and return a random password and drag the returned value to the field.

A. Action

1. Action Input

find_real_file.png

2. Script step

(function execute(inputs, outputs) {
    var pwdLength = inputs.length;
    var randomString = '';
    for (var i = 0; i < pwdLength; i++) {
        randomString = Math.random().toString(36).slice(-8);
    }
	outputs.password = randomString;
})(inputs, outputs);

find_real_file.png

3. Action Output

find_real_file.png

B. Sample execution flow (since I don't have AD Integration Hub). Instead of "Log", use the AD Integration Hub.

find_real_file.png

Execution result:

find_real_file.png

dhanalakshmi4
Tera Contributor

Hi, i tried in the same way which you are following. But it is not working. The random password is not triggering . Please find the attached picture. Thanks in advance.

dhanalakshmi4_0-1692272951692.png

 

dhanalakshmi4
Tera Contributor

Can you please share the screenshot of log page on flow designer.

 

Thanks in advance,

Dhana