cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
skindu
Helper III
Helper III

Add new team member to sharepoint group

Hi...

 

I'm creating a flow so that the new member is automatically added to a sharepoint group, but I get an error.

Whats wrong?

 

 

" Exception of type 'System.ArgumentException' was thrown.
Parameter name: encodedValue...

 

Captura de ecrã 2022-01-17 014133.png

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Dual Super User
Dual Super User

Hi @skindu,

 

It looks like you didn't include the membership in the prefix of the LoginName value.

 

Can you try this instead in the body:

{ '__metadata': { 'type': 'SP.User' }, 'LoginName':'i:0#.f|membership|@{outputs('Get_user_profile_(V2)')?['body/userPrincipalName']}' }

View solution in original post

1 REPLY 1
Expiscornovus
Dual Super User
Dual Super User

Hi @skindu,

 

It looks like you didn't include the membership in the prefix of the LoginName value.

 

Can you try this instead in the body:

{ '__metadata': { 'type': 'SP.User' }, 'LoginName':'i:0#.f|membership|@{outputs('Get_user_profile_(V2)')?['body/userPrincipalName']}' }

Helpful resources

Announcements
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.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (2,402)