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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (4,285)