SOLVED

Programmatically set site Sharing Permissions

%3CLINGO-SUB%20id%3D%22lingo-sub-2367359%22%20slang%3D%22en-US%22%3EProgrammatically%20set%20site%20Sharing%20Permissions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2367359%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20looking%20for%20a%20way%20to%20%3CSTRONG%3Eprogrammatically%20set%20the%20site%20level%20sharing%20permissions%2C%20which%20can%20be%20found%20in%20%22Site%20Permissions%20--%26gt%3B%20Change%20how%20members%20can%20share%22%3C%2FSTRONG%3E%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22sharing-permissions.PNG%22%20style%3D%22width%3A%20402px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F281786iE1FAC14D8B34B3E3%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22sharing-permissions.PNG%22%20alt%3D%22sharing-permissions.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUnlike%20the%20tenant%20level%20sharing%20settings%2C%20I%20cannot%20find%20developer%20documentation%20for%20these%20site%20level%20settings.%20Can%20anyone%20help%20with%20this%20subject%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2370302%22%20slang%3D%22en-US%22%3ERe%3A%20Programmatically%20set%20site%20Sharing%20Permissions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2370302%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F130007%22%20target%3D%22_blank%22%3E%40Marco%20Santos%3C%2FA%3E%26nbsp%3BCheck%20the%20attachment.%20it%20does%20everything%20you%20need.%3C%2FP%3E%3CP%3ELet%20me%20know%20if%20you%20have%20any%20questions.%3C%2FP%3E%3CP%3ECheers%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2388087%22%20slang%3D%22en-US%22%3ERe%3A%20Programmatically%20set%20site%20Sharing%20Permissions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2388087%22%20slang%3D%22en-US%22%3EThank%20you%20Lu%C3%ADs%2C%20tested%20and%20confirmed.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20focused%20on%20finding%20a%20specific%20property%20to%20make%20this%20configuration%20and%20end%20up%20not%20realizing%20that%20it%20actually%20requires%20a%20combination%20of%20different%20properties.%3CBR%20%2F%3E%3CBR%20%2F%3ECheers!%3C%2FLINGO-BODY%3E
New Contributor

Hi,

 

I'm looking for a way to programmatically set the site level sharing permissions, which can be found in "Site Permissions --> Change how members can share":

 

sharing-permissions.PNG

 

Unlike the tenant level sharing settings, I cannot find developer documentation for these site level settings. Can anyone help with this subject?

2 Replies
best response confirmed by Marco Santos (New Contributor)
Solution

@Marco Santos Check the attachment. it does everything you need.

Let me know if you have any questions.

Cheers

 

Thank you Luís, tested and confirmed.

I focused on finding a specific property to make this configuration and end up not realizing that it actually requires a combination of different properties.

Cheers!