Introduction:In this blog, we will understand how we can create new users in the Azure active directory using Power Automate (MS Flow).
Steps to be followed:
- Search for Azure AD connector and select Create user action.


- Enter values in parameters.
- Account Enabled: Yes
- Display Name: FirstName + LastName
- Mail Nickname: FirstName
- Password: Generate Random Password
- User Principal Name: UserName@domainName.com
- Given Name: User FirstName
- Surname: User LastName

NOTE:
- In my example, I am generating a password in the below format
- LastName + @ + Random 4 digit Number (vyas@5678)
concat(triggerBody()['text_1'],'@',string(rand(1000, 10000)))

- In my example, I am generating a User Principal Name in the below format
- First Character of firstName + LastName (vvyas)
concat(first(triggerBody()['text']),triggerBody()['text_1'])

Entire Flow:

Running the flow:



NOTE: You must have a Global administrator or User administrator role to create users.
In the next blog, we will see how to assign licenses to newly created users using Power Automate.