Adding user to sharepoint group using MS flow-error

Contributor

I am using MS flow with "Send an HTTP request to Sharepoint" to add user into SP group

please find attached screenshot,

i have following JSON

 

 

{
'_metadata':{'type':'SP.User'},
'LoginName':'i:0#.f|membership|chetan.raut@xyz.com'
}

Add_user.PNG

 

I am getting following error:-

The property '_metadata' does not exist on type 'SP.User'. Make sure to only use property names that are defined by the type.

 

any idea what is wrong? and how i can add user to sharepoint group using MS Flow

7 Replies

Corrected above error, its due to some incorrect JSON.

 

but now I am getting following error.

 

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.

 

Add_user.PNG

any update on above issue?

@rautchetan27  Hi were you able to figure it out? I have the same issue

@LuiLui 

 

No, it still giving me error, you able to fix it?

@rautchetan27 Try replace _metadata with __metadata

This solved it for me. Thanks @ramkiranvure

@ramkiranvure  Its worked for me when i use __metadata instead of _-metadata