Adding user to sharepoint group using MS flow-error

%3CLINGO-SUB%20id%3D%22lingo-sub-1458924%22%20slang%3D%22en-US%22%3EAdding%20user%20to%20sharepoint%20group%20using%20MS%20flow-error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1458924%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20using%20MS%20flow%20with%20%22Send%20an%20HTTP%20request%20to%20Sharepoint%22%20to%20add%20user%20into%20SP%20group%3C%2FP%3E%3CP%3Eplease%20find%20attached%20screenshot%2C%3C%2FP%3E%3CP%3Ei%20have%20following%20JSON%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%7B%3CBR%20%2F%3E'_metadata'%3A%7B'type'%3A'SP.User'%7D%2C%3CBR%20%2F%3E'LoginName'%3A'i%3A0%23.f%7Cmembership%7Cchetan.raut%40xyz.com'%3CBR%20%2F%3E%7D%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Add_user.PNG%22%20style%3D%22width%3A%20622px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F198367i444F5183449DDED7%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Add_user.PNG%22%20alt%3D%22Add_user.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20getting%20following%20error%3A-%3C%2FP%3E%3CP%3E%3CSTRONG%3EThe%20property%20'_metadata'%20does%20not%20exist%20on%20type%20'SP.User'.%20Make%20sure%20to%20only%20use%20property%20names%20that%20are%20defined%20by%20the%20type.%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eany%20idea%20what%20is%20wrong%3F%20and%20how%20i%20can%20add%20user%20to%20sharepoint%20group%20using%20MS%20Flow%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1458924%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESecurity%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1458938%22%20slang%3D%22en-US%22%3ERe%3A%20Adding%20user%20to%20sharepoint%20group%20using%20MS%20flow-error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1458938%22%20slang%3D%22en-US%22%3E%3CP%3ECorrected%20above%20error%2C%20its%20due%20to%20some%20incorrect%20JSON.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ebut%20now%20I%20am%20getting%20following%20error.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EAn%20entry%20without%20a%20type%20name%20was%20found%2C%20but%20no%20expected%20type%20was%20specified.%20To%20allow%20entries%20without%20type%20information%2C%20the%20expected%20type%20must%20also%20be%20specified%20when%20the%20model%20is%20specified.%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Add_user.PNG%22%20style%3D%22width%3A%20622px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F198368i96DEB7DB1286D10C%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Add_user.PNG%22%20alt%3D%22Add_user.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1462587%22%20slang%3D%22en-US%22%3ERe%3A%20Adding%20user%20to%20sharepoint%20group%20using%20MS%20flow-error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1462587%22%20slang%3D%22en-US%22%3E%3CP%3Eany%20update%20on%20above%20issue%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1487211%22%20slang%3D%22en-US%22%3ERe%3A%20Adding%20user%20to%20sharepoint%20group%20using%20MS%20flow-error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1487211%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F670519%22%20target%3D%22_blank%22%3E%40rautchetan27%3C%2FA%3E%26nbsp%3B%20Hi%20were%20you%20able%20to%20figure%20it%20out%3F%20I%20have%20the%20same%20issue%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1498239%22%20slang%3D%22en-US%22%3ERe%3A%20Adding%20user%20to%20sharepoint%20group%20using%20MS%20flow-error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1498239%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F644772%22%20target%3D%22_blank%22%3E%40LuiLui%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENo%2C%20it%20still%20giving%20me%20error%2C%20you%20able%20to%20fix%20it%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1677498%22%20slang%3D%22en-US%22%3ERe%3A%20Adding%20user%20to%20sharepoint%20group%20using%20MS%20flow-error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1677498%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F670519%22%20target%3D%22_blank%22%3E%40rautchetan27%3C%2FA%3E%26nbsp%3BTry%20replace%20_metadata%20with%26nbsp%3B__metadata%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
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

5 Replies
Highlighted

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

Highlighted

any update on above issue?

Highlighted

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

Highlighted

@LuiLui 

 

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

Highlighted

@rautchetan27 Try replace _metadata with __metadata