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 / Show information about...
Power Apps
Unanswered

Show information about another user (taken from Office 365) and complete fields automatically

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Basicaly, I want to make a form where some of the fields (name, job title, department, etc) will be autocompleted so the user won't have to complete them by hand.

 

 

Based on the full name, I want other fields to populate automatically. Can that be done? I'm using a "Person or Group" type of column for the name, so you can search users and don't make mistakes mispelling names, etc.

 

Thanks

 

 

Categories:
I have the same question (0)
  • K-A-R-L Profile Picture
    715 on at

    Hi @Anonymous ,

    Are you using forms or galleries?

    You might need to add the Office365 connection for this.


    OnStart Property of the app:

    Set(
    MyProfile,
    Office365Users.MyProfile()
    );
     


    *Gallery*

    You can use the codes below on your fields:



    Office365Users.UserProfile().Department
    Office365Users.UserProfile().DisplayName
    Office365Users.UserProfile().GivenName
    Office365Users.UserProfile().Id
    Office365Users.UserProfile().JobTitle
    Office365Users.UserProfile().Mail
    Office365Users.UserProfile().MailNickname
    Office365Users.UserProfile().Surname
    Office365Users.UserProfile().TelephoneNumber
    Office365Users.UserProfile().UserPrincipalName
    Office365Users.UserProfile().AccountEnabled


    *Forms*
    On the field you want to be automatically populate you need to add this:

    Office365Users.UserProfile(MyProfile).mail


    Please check this link.

    Cheers


  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I'm using forms.

     

    I don't need to get my profile (or the profile of the user who's filling the form) but rather get the profile of another user (selected in a dropdown).

     

    Anyone can fill this form and input another user's data. I need to populate the fields with that user's data.

     

    Example, I'm logged in with my Office 365 profile, I'm Lucas, but I need to fill the form for Justin, so I need the fields to auto populate with Justin's information without me having to type it in.

  • AlexN Profile Picture
    269 on at

    As @K-A-R-L said, you can use the Office365users connector. So when you want to receive the info from a user with the e-mail john.doe@contoso.com, you would use the formula:

    Office365Users.UserProfile("john.doe@contoso.com").Department;

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Problem is, not everyone knows the email of the other user.

     

    Despite that, I tried using the email, so I created a text input field where the user types the email, and used the following formula in the other fields I want to populate:

     

    Office365Users.UserProfile(TextInput1.Text).Department

     

    It detects the email, but the result of the flow is 404. Doesn't seem to be working.

  • K-A-R-L Profile Picture
    715 on at

    Hi @Anonymous ,

    I can give you a better solution instead of using dropdown try the Office365Users.SearchUser function.

     

    Please watch this video.

    I added a gallery and a searchTextInput to search for Office365 users that will automatically populate the forms:


    *Screen*
    OnVisible Property: 
    UpdateContext({Selected:false});


    *Gallery*
    Item:

    If(Not(IsBlank(Trim(SubmitToSearchInput.Text))),Office365Users.SearchUser({searchTerm:Trim(SubmitToSearchInput.Text)}))

    OnSelect property:

    UpdateContext({Selected:true});
    Set(SelectedDisplayName, ThisItem.DisplayName);
    Set(SelectedDepartment,ThisItem.Department);
    Set(SelectedGivenName, ThisItem.GivenName);
    Set(SelectedID,ThisItem.Id);
    Set(SelectedEmail, ThisItem.Mail);
    Set(SelectedJobTitle,ThisItem.JobTitle);
    Set(SelectedSurname, ThisItem.Surname);
    Set(SelectedUserPrincipalName,ThisItem.UserPrincipalName)


    *Forms*
    You need to unlock all the data card value:

    Set the Default of each Datacard values to corresponding data field that you want:

    e.g On Department Datacard Default Property:
    If(Selected = true, SelectedDepartment)

    Let me know if you're having trouble.

    Cheers

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Anonymous can you review the above reply and update the thread if it was helpful? 

     

    Thank you,

     

    @Anonymous 

  • 2cawright Profile Picture
    2 on at

    This is close to what I am trying to do but I dont seem to be able to get it to work.

     

    I have a SharePoint list that I am using a power app form.  I have a people picker to select a user and I other I have other fields that need the information from the selected profile.  I had thought a gallery would be the way to go, so I was hoping this solution would work.  I don't seem to be able to connect the selected user profile items to the other fields.  I do have the Office365 connector so that is not the issue.

     

    Any suggestions or maybe some screenshots would help.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard