Forum Discussion

AthabascanDave's avatar
AthabascanDave
Copper Contributor
Apr 29, 2022
Solved

Auto-populate SharePoint columns with profile information

This has been asked previously but some of the information seems stale due to O365 changes, or just hasn't worked for me.    The short version is I have a SharePoint list with the person or group c...
  • RobElliott's avatar
    Apr 30, 2022

    AthabascanDave don't rely on templates, you can build a very simple flow from blank to do this. The overall flow looks like this and we'll look at the trigger and each of the 2 actions later:

     

    In the SharePoint list there is a person column called Employee and the Title column where the employee's name or account name can be stored. I've also added single line of text columns for position, department and mobile phone number. Those last 3 are what will be auto-populated.

     

    For the SharePoint form you can remove those 3 columns as you won't be entering that data manually. This will leave just the person column and the title column:

     

     

    So a new item is created, the flow will run and the 3 other columns will be populated with the employee's info:

    The flow has a SharePoint trigger of "When an item is created" and you select the site and the list:

     

     

    Next, add an Office 365 Users "Get user profile (v2)" action and for the User (UPN) field, click in the field and select Employee Email from the dynamic content box that appears:

     

     

    Finally, add a SharePoint "Update item" action. Again, select your site and list and in the ID field select ID from the when an item is created section of the dynamic content box. 

     

     

    Scroll down through the dynamic contents box and you'll see the employee's information is available to be selected from the Get user profile (v2) section of the dynamic content box:

     

    Rob
    Los Gallardos
    Microsoft Power Automate Community Super User

Resources