cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gasilva8
Helper II
Helper II

Add user to SharePoint group

I'm working on a flow with PowerApps trigger, so I get users email to add that person to a SharePoint Group.

Below is my flow.  I'm trying to use "Claims" information. So basically I'm extracting the part before the @ from users email and concatenating to "@organization.onmicrosoft.com" to use on the last step.

gasilva8_1-1656600666730.png

On the last step I'm using these parameters:

gasilva8_0-1656600116002.png

But I'm getting this "InternalServerError", and the flow keeps trying to run this but without success.

gasilva8_3-1656601144300.png

What I'm doing wrong?

Thank you!!

 

3 REPLIES 3
eliotcole
Super User
Super User

Hi, @gasilva8 ... try this ... take off the ;odata=verbose part from the Content Type ... if it still fails, put it back, and try it on the Accept ... but it's usually Content Type, I think.

 

Often times you can also try looking at any ID values that you might be using in the URI here, try ensuring that they're uriEncoded(). However that's not an issue for you as you're not.

 

The SharePoint and Graph APIs can be finickity about this at times, sometimes accepting them fine, and sometimes needing the encoding. I think if you just always encode, though, it usually works.

Hi @eliotcole!

I tried to take off the odata=verbose part but it didn't work.

Could you please explain more about uriEncoded()? Where should I use it?

 

eliotcole
Super User
Super User

It's not needed on your URI, @gasilva8, so you're currently OK there.

 

Why don't you just use one of the users / groups actions in Power Automate?

 

Or is this for an old SharePoint group, not a 365 group?

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (4,062)