cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
csmith1
Level: Powered On

Flow to add users to sharepoint group from powerapps button

Hi All,

 

I have searched a bit on the forums and done some reading on this issue but am a little stuck.

 

I am trying to trigger a flow to add a user to a sharepoint group with member permissions based on and email field and button press in powerapps.

 

Here is what I have so far, I am not sure what I am doing wrong. 

 

HTTPReq.png

 

Where I am passing the user's email into HTTSP_Body through a field in powerapps named New_User_Email into the flow called GiveAccess.

Email_Flow.pngExampleInput.png

I am sure there is something obvious here that I am missing. 

 

Any help on this issue is greatly appreciated!

 

Thanks in advance!

 

 
 
4 REPLIES 4
Gristy
Level 10

Re: Flow to add users to sharepoint group from powerapps button

Lets start with the output of the action what is that?

 

claims username format is : i:0#.f|membership|firstname.lastname@domain

it looks like yours will end up like:

 

i:0#.f|membership|'firstname.lastname@domain

 

with the extra ' that it is needed.

csmith1
Level: Powered On

Re: Flow to add users to sharepoint group from powerapps button

@Gristy 

 

Thanks for the reply. Here is the output I am getting, I made a couple modifications but still cant get it working.

2019_11_07_08_12_48_Window.png2019_11_07_08_14_49_Run_History_Power_Automate.png

Where the full output is:

 

{
"status": 400,
"message": "An entry without a type name was found, but no expected type was specified. To allow entries without type information, the expected type must also be specified when the model is specified.\r\nclientRequestId: 60f61414-a24b-4654-9ec3-5fe38e8068e0\r\nserviceRequestId: a682159f-5022-9000-4aec-1476cd390873",
"errors": [
"-1",
"Microsoft.SharePoint.Client.InvalidClientQueryException"
]
}
 
The correct email variable is being passed from powerapps but the flow is setup wrong to interpret the request. Anything else you see?
Gristy
Level 10

Re: Flow to add users to sharepoint group from powerapps button

try getting rid of the metadata line.

 

perhaps also try via the group id which you can see in the URL in SharePoint

 

https://emadgabriel.com/2019/01/04/microsoft-flow-add-user-to-sharepoint-group/

csmith1
Level: Powered On

Re: Flow to add users to sharepoint group from powerapps button

Same issue with the bad request

 

2019_11_07_16_48_14_Run_History_Power_Automate.png

 

{
"message": "An entry without a type name was found, but no expected type was specified. To allow entries without type information, the expected type must also be specified when the model is specified.\r\nclientRequestId: cdcdcbd5-b4b7-413c-a7e6-f9ff0a32f41d\r\nserviceRequestId: 36a0159f-4016-9000-6176-9dc0633f9fcb",
"status": 400,
"errors": [
"-1",
"Microsoft.SharePoint.Client.InvalidClientQueryException"
]
}
 
I had been trying to mimic this solution

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,109)