Skip to content

Create User in Azure Active Directory using Power Automate(MS Flow)

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:

  1. Search for Azure AD connector and select Create user action.
  1. 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:

  1. 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)))
  1. 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.   

5 1 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments