How to read the default sharing link type of a SharePoint site
What link does the Share button create by default on this site?
30-second answer
$site = Get-PnPTenantSite -Identity https://contoso.sharepoint.com/sites/finance
$site.DefaultSharingLinkType # None | Direct | Internal | AnonymousAccess
None does not mean "no default". It means the site inherits the tenant
default. To know what the Share button actually does, you need both
values.
What this proves
Whether this site has its own default link type, and what it is when it
does. Direct shares with the people specified, Internal creates a link
for anyone in the organisation, AnonymousAccess creates an Anyone link.
What it does not prove
- What the effective default is, when the value is
None. The answer then lives on the tenant, and a report that printsNoneas if it were an answer has proved nothing. On a real tenant, all 53 sites returnedNone; a rule that read the site value alone would have passed every one of them while knowing nothing. - What links users actually create. The default is one click away from being changed at share time, within what the site permits.
PowerShell
$tenant = Get-PnPTenant
$site = Get-PnPTenantSite -Identity https://contoso.sharepoint.com/sites/finance
$effective = if ($site.DefaultSharingLinkType -eq 'None') {
"$($tenant.DefaultSharingLinkType) (inherited from the tenant)"
} else {
"$($site.DefaultSharingLinkType) (set on the site)"
}
$effective
Example output
Internal (inherited from the tenant)
Explanation
The derived value is the honest one: it says what the Share button will do and where that decision lives. The distinction matters for remediation. A site-level value is fixed on the site; an inherited value changes for every inheriting site the moment somebody changes the tenant, which is either the efficiency or the blast radius, depending on the day.
Production considerations
- Both cmdlets need the admin-centre connection and a SharePoint administrator role.
- A sensitivity label can also set the default link on labelled sites, via PowerShell-only label settings. On a tenant that uses labels, check the label before concluding the value was hand-set.
References
- Change the default sharing link (Microsoft Learn)
- Use sensitivity labels with SharePoint sites (Microsoft Learn)
