Forum Discussion

nshaw75's avatar
nshaw75
Copper Contributor
Apr 18, 2024

Adding User ID's from a MS Form

Hi guy's, I am not sure if this is the right forum to post, I cannot find one specifically for Forms.

 

I have a Form which with the help of Power Automate populates a SP List with tasks that need completing. Cutting to the chase, I have a column in which the ID badge of the task owner is shown.

The only way I have been able to achieve this is by linking this is by either a: putting the email address of the owner into the form, or b) typing the name of the owner then writing some complex coding in power automate to find the ID. In both cases this relies on whoever will be creating the task to know the exact name/spelling of the owner. I work for a very large company and people's ID are not as straightforward. Joe Blogs maybe joseph.blogs@..., joe.blogs2@..., or joesphx.blogs@...

I know in Power Apps is probably the best way to go along, but I have already a complex flow set up and am not looking forward to redoing all that work. 

  • Rob_Elliott's avatar
    Rob_Elliott
    Bronze Contributor

    nshaw75 you just need to use the Office365Users Get user profile (v2) action and for the input select Responder's Email from the dynamic content box. Then in your subsequent actions you have access to all the AD information about the user. For your Owner ID column select Mail.

     

    So in this example I will select Guadeloupe in the form:

     

     

    The flow has the usual When a new response is submitted trigger immediately followed by the Get response details action. Then add the Office365Users Get user profile (v2) action:

     

     

    And for the SharePoint columns I have selected Mail and Department:

     

     

    This is the result.

     

     

    Edit: by the way the Forms forum is at https://techcommunity.microsoft.com/t5/microsoft-forms/bd-p/MicrosoftForms

     

     

    Rob
    Los Gallardos
    Microsoft Power Automate Community Super User.
    Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)

    • nshaw75's avatar
      nshaw75
      Copper Contributor
      Hi rob_elliot ,Thank you for the response. From your method this is using the responders email as the identifier. I am wanting for the responder to be able to assign a task to someone else. Eg Joe is creating the task but there are actions for Peter or Katy etc

      Thank you for pointing me in the correct direction of he Form forum, I had been looking all over for it
      • Rob_Elliott's avatar
        Rob_Elliott
        Bronze Contributor

        nshaw75 sorry, I hadn't picked up that it was someone else assigning the Owner.  In that case, because Forms cannot look up anyone from Azure AD, you will need to have a question in the form for the Owner email address and use that as the input for the user profile (v2) action. There really is no way round that.

         

        Rob
        Los Gallardos
        Microsoft Power Automate Community Super User.
        Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)

Resources