cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted
Super User II
Super User II

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.

Highlighted
Frequent Visitor

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?
Highlighted
Super User II
Super User II

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/

Highlighted
Frequent Visitor

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
FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (6,256)