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 Automate / Pass the user details ...
Power Automate
Unanswered

Pass the user details from Power Apps to Power Automate (Flow) using parameters. and Give SharePoint create item acesss

(0) ShareShare
ReportReport
Posted on by

HI Everyone,

 

I have a button in my power app, when the user clicks on the button, I want to run a flow to give permission for the user to create an item in my SharePoint list 

I have created the flow, but I don't know how to get the user details form the Power App to flow

 

Danny_Dicaprio_0-1716967554191.png

 

 

could anyone please help me to fix the issue

 

Categories:
I have the same question (0)
  • SanmeshG Profile Picture
    1,947 Moderator on at

    Hi @Danny_Dicaprio ,

     

    1. In your Power Automate select the PowerApps (V2) trigger , name the variable and add the next steps (If you want to use the email from field , then you can use it in the next actions.

    SanmeshG_0-1716968737255.png

    2. In PowerApps , add a button control and pass the logged in User Email , if that's what you want to use.

    Here in the below screenshot ,

    User().Email is the logged in user email and also in my flow that is the only parameter that I have asked for in my flow , if you have more parameters , pass them as comma separated values.

    SanmeshG_1-1716968902227.png

    If this helps , please give this a thumbs up and mark this as a solution.

     

    Thanks,

    Sanmesh

     

  • Danny_Dicaprio Profile Picture
    on at

    Hi @SanmeshG 

     

    Thanks for the response 

     

    Could u please help me how to give edit access to my SharePoint List using " send an http request "

  • SanmeshG Profile Picture
    1,947 Moderator on at

    Hi @Danny_Dicaprio  ,

     

    You want to give access to SP List or a specific SP list item ?

     

    If you want to give access to a specific list item , then consider using grant access to an item or a folder action in Power Automate.

     

    Now to give permissions to list you can use the below steps , all of them are sending an http request to SharePoint. 

     

    1. Break the Inheritance of the list permission , (if you don't want to give unique permission to the list then that is okay , you can directly add the user to a SP Group which is used in giving access to this list)

    2. Get User principle Id

    3. Give user the permission using the last POST method.

    (please note if you want to use same expression then you have to name the action same as I have in my flow - see screenshot). Also ensure that there is no change in JSON schema and it fetches the Id property from the action output correctly.

     

     

    //expression to get the usr principle Id
    body('Send_an_HTTP_request_to_SharePoint_-_Get_User_Principle_Id')?['d']?['Id']
    
    //expression to give the user the permission- 3rd HTTP call Uri property
    _api/web/lists/getByTitle('Country')/roleassignments/addroleassignment(principalid=@{outputs('Compose_-_Get_User_Principle_Id')}, roledefid=1073741827)
    
    //headers
    {
     "Accept ": "application/json;odata=verbose",
     "content-Type": "application/json;odata=verbose"
    }

     

     

    S1S1

     

     

    If you just want to add the user to a SP group without breaking permission , then you can use the below.

     

    SanmeshG_0-1716979713454.png

     

     

    {
     "__metadata": {
     "type": "SP.User"
     },
    "LoginName":"i:0#.f|membership|user@company.com"
    }

     

     

    Please give this a thumbs up and mark this as a solution.

     

    Thanks,

    Sanmesh

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

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 840

#2
Valantis Profile Picture

Valantis 661

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard