Forum Discussion

rautchetan27's avatar
rautchetan27
Brass Contributor
Jun 12, 2020

Adding user to sharepoint group using MS flow-error

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'
}

 

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

  • AlvinMorogo's avatar
    AlvinMorogo
    Copper Contributor
    Mine also worked when I removed the whole line of '__metadata' in the body
  • rautchetan27's avatar
    rautchetan27
    Brass Contributor

    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.

     

Resources