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 / AzureAD Create User
Power Apps
Answered

AzureAD Create User

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Experts 🙂

 

Maybe I try to be too clever, but here is my case. 

I am developing a business app for my company with an employee register. My plan is that when I new employee starts, I will use the information already registered on the person to create a new user in Azure AD. 

 

I found this AzureAd connector and used a gallery where I select the new employee to be created in Azure AD. 

I quickly got stuck with the password part:
 azureAD CreateUser.PNG

 

The passwordProfile allways complain about it need a record. I tried making a collection, a variable and plain "password", but nothing works. 

 

Please advice, and thanks in advance for any feedback 🙂

 

Categories:
I have the same question (0)
  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi,

     

    I have tested on my side, and it works well.

    PasswordProfile needs to be record type, but “ recordPassword.Password” shown in the screenshot seems to be table type.

    You can use {ColumnName1: value1, ColumnName2: value2,…} to create a record.

    Please refer to following formula:

    AzureAD.CreateUser(true;"Test Test";"Test Test", {password: First(recordPassword).Password} ,"test.test@test.no")

    For more information of record, please review following document.

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/working-with-tables#elements-of-a-table

     

    Best regards,

    Sik

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @v-siky-msft . Thanks for the push in right direction. 

     

    The solution that worked for me was to make a collection named _password with a column named password and then use First(_password)

    AzureAD.CreateUser(true;inp_azureDispName.Text;inp_azureDispName.Text;First(_password);inp_azurePrinsipal.Text;{givenName:inp_azureFornavn;surname:inp_azureEtternavn;department:inp_azureAvdeling;jobTitle:drd_azureStilling.Selected.Navn})

    It would not accept First(_Password).Password as it asked for the column password. 

     

    Now I get e feedback with a bad request: 
    azureAD badRequest.PNG

    I will search for a solution for this now. If you have any solutions for me, I appreciate, if not, thanks a lot for the help with the password. 

     

    Best regards

    Tommy

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

    Hi @TurboTape ,

     

    The error shows that your mailNickName is invaild, please check if there is sapce or other illegal characters in it.

     

    Best Regards

    Sik

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    There was a space yes. All good now, and it works perfectly 🙂

     

    Thanks 🙂

  • Adi007 Profile Picture
    34 on at

    would you mind to show us how did you made this to work =)?

  • gaborszollosy Profile Picture
    71 on at

    Hello there!

     

    Thanks for your answer! Can the password in your example be set permanent, not requiring the user to change it on the first sign in?

     

    Thank you!

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard