Sharing Web is blocked for Teams Channel Site

Copper Contributor

I have a Teams Private Channel.
I login to Teams as user X and share a file or folder with an existing internal user, user Y. User Y is not a member of the Team or Channel and can still access the file.  Great - that's want I want to do but I want to do it programatically by creating a sharing link using an ASP.NET program.

When I create the link in .NET, making sure the creator is user X, I get the error "Sharing web is blocked for Teams Channel site".  

So, why can I create this sharing link manually but not programtically?  Where is the setting that is blocking this from being allowed?

3 Replies

@cymorg1 - Could you please share the repro steps whatever you are trying? Is there any documentation you are referring to?

Microsoft Verified Best Answer
My bad... I was using Microsoft.SharePoint.Client.ClientContext.Web.ShareDocument() with a bad param, so of course I got an error. Apologies for wasting your time.

@cymorg1 - Thanks for confirmation.
You can share your feedback via Microsoft Teams Developer Feedback link.